diff options
author | amit@chromium.org <amit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-09 00:51:10 +0000 |
---|---|---|
committer | amit@chromium.org <amit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-09 00:51:10 +0000 |
commit | 97965e190cb9f5009f6c97195bef9225c6034931 (patch) | |
tree | 96f2320c853a50d06664a1b2134a0dcb97c42bac /chrome_frame/stream_impl.cc | |
parent | 4a626f876a6dcd77e4d2cfc5d2496acdd44d7fe1 (diff) | |
download | chromium_src-97965e190cb9f5009f6c97195bef9225c6034931.zip chromium_src-97965e190cb9f5009f6c97195bef9225c6034931.tar.gz chromium_src-97965e190cb9f5009f6c97195bef9225c6034931.tar.bz2 |
Switch renderer in Moniker patch
Step one of the changes. Inspect data and cause a switch
in the moniker patch.
Review URL: http://codereview.chromium.org/1589013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44038 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/stream_impl.cc')
-rw-r--r-- | chrome_frame/stream_impl.cc | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/chrome_frame/stream_impl.cc b/chrome_frame/stream_impl.cc new file mode 100644 index 0000000..246e7ea --- /dev/null +++ b/chrome_frame/stream_impl.cc @@ -0,0 +1,95 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome_frame/stream_impl.h" + +#include "base/logging.h" + +void StreamImpl::Initialize(IStream* delegate) { + delegate_ = delegate; +} + +STDMETHODIMP StreamImpl::Write(const void * buffer, ULONG size, + ULONG* size_written) { + HRESULT hr = E_NOTIMPL; + if (delegate_) + hr = delegate_->Write(buffer, size, size_written); + return hr; +} + +STDMETHODIMP StreamImpl::Read(void* pv, ULONG cb, ULONG* read) { + HRESULT hr = E_NOTIMPL; + if (delegate_) + hr = delegate_->Read(pv, cb, read); + return hr; +} + +STDMETHODIMP StreamImpl::Seek(LARGE_INTEGER move, DWORD origin, + ULARGE_INTEGER* new_pos) { + HRESULT hr = E_NOTIMPL; + if (delegate_) + hr = delegate_->Seek(move, origin, new_pos); + return hr; +} + +STDMETHODIMP StreamImpl::SetSize(ULARGE_INTEGER new_size) { + HRESULT hr = E_NOTIMPL; + if (delegate_) + hr = delegate_->SetSize(new_size); + return hr; +} + +STDMETHODIMP StreamImpl::CopyTo(IStream* stream, ULARGE_INTEGER cb, + ULARGE_INTEGER* read, + ULARGE_INTEGER* written) { + HRESULT hr = E_NOTIMPL; + if (delegate_) + hr = delegate_->CopyTo(stream, cb, read, written); + return hr; +} + +STDMETHODIMP StreamImpl::Commit(DWORD flags) { + HRESULT hr = E_NOTIMPL; + if (delegate_) + hr = delegate_->Commit(flags); + return hr; +} + +STDMETHODIMP StreamImpl::Revert() { + HRESULT hr = E_NOTIMPL; + if (delegate_) + hr = delegate_->Revert(); + return hr; +} + +STDMETHODIMP StreamImpl::LockRegion(ULARGE_INTEGER offset, ULARGE_INTEGER cb, + DWORD type) { + HRESULT hr = E_NOTIMPL; + if (delegate_) + hr = delegate_->LockRegion(offset, cb, type); + return hr; +} + +STDMETHODIMP StreamImpl::UnlockRegion(ULARGE_INTEGER offset, ULARGE_INTEGER cb, + DWORD type) { + HRESULT hr = E_NOTIMPL; + if (delegate_) + hr = delegate_->UnlockRegion(offset, cb, type); + return hr; +} + +STDMETHODIMP StreamImpl::Stat(STATSTG* statstg, DWORD flag) { + HRESULT hr = E_NOTIMPL; + if (delegate_) + hr = delegate_->Stat(statstg, flag); + return hr; +} + +STDMETHODIMP StreamImpl::Clone(IStream** stream) { + HRESULT hr = E_NOTIMPL; + if (delegate_) + hr = delegate_->Clone(stream); + return hr; +} + |