1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome_frame/stream_impl.h"
7 #include "base/logging.h"
9 void StreamImpl::Initialize(IStream
* delegate
) {
13 STDMETHODIMP
StreamImpl::Write(const void * buffer
, ULONG size
,
14 ULONG
* size_written
) {
15 HRESULT hr
= E_NOTIMPL
;
17 hr
= delegate_
->Write(buffer
, size
, size_written
);
21 STDMETHODIMP
StreamImpl::Read(void* pv
, ULONG cb
, ULONG
* read
) {
22 HRESULT hr
= E_NOTIMPL
;
24 hr
= delegate_
->Read(pv
, cb
, read
);
28 STDMETHODIMP
StreamImpl::Seek(LARGE_INTEGER move
, DWORD origin
,
29 ULARGE_INTEGER
* new_pos
) {
30 HRESULT hr
= E_NOTIMPL
;
32 hr
= delegate_
->Seek(move
, origin
, new_pos
);
36 STDMETHODIMP
StreamImpl::SetSize(ULARGE_INTEGER new_size
) {
37 HRESULT hr
= E_NOTIMPL
;
39 hr
= delegate_
->SetSize(new_size
);
43 STDMETHODIMP
StreamImpl::CopyTo(IStream
* stream
, ULARGE_INTEGER cb
,
45 ULARGE_INTEGER
* written
) {
46 HRESULT hr
= E_NOTIMPL
;
48 hr
= delegate_
->CopyTo(stream
, cb
, read
, written
);
52 STDMETHODIMP
StreamImpl::Commit(DWORD flags
) {
53 HRESULT hr
= E_NOTIMPL
;
55 hr
= delegate_
->Commit(flags
);
59 STDMETHODIMP
StreamImpl::Revert() {
60 HRESULT hr
= E_NOTIMPL
;
62 hr
= delegate_
->Revert();
66 STDMETHODIMP
StreamImpl::LockRegion(ULARGE_INTEGER offset
, ULARGE_INTEGER cb
,
68 HRESULT hr
= E_NOTIMPL
;
70 hr
= delegate_
->LockRegion(offset
, cb
, type
);
74 STDMETHODIMP
StreamImpl::UnlockRegion(ULARGE_INTEGER offset
, ULARGE_INTEGER cb
,
76 HRESULT hr
= E_NOTIMPL
;
78 hr
= delegate_
->UnlockRegion(offset
, cb
, type
);
82 STDMETHODIMP
StreamImpl::Stat(STATSTG
* statstg
, DWORD flag
) {
83 HRESULT hr
= E_NOTIMPL
;
85 hr
= delegate_
->Stat(statstg
, flag
);
89 STDMETHODIMP
StreamImpl::Clone(IStream
** stream
) {
90 HRESULT hr
= E_NOTIMPL
;
92 hr
= delegate_
->Clone(stream
);