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.h | |
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.h')
-rw-r--r-- | chrome_frame/stream_impl.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/chrome_frame/stream_impl.h b/chrome_frame/stream_impl.h new file mode 100644 index 0000000..9cced3e --- /dev/null +++ b/chrome_frame/stream_impl.h @@ -0,0 +1,44 @@ +// 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. + +#ifndef CHROME_FRAME_STREAM_IMPL_H_ +#define CHROME_FRAME_STREAM_IMPL_H_ + +#include <atlbase.h> +#include <atlcom.h> + +#include "base/scoped_comptr_win.h" + +// A generic base class for IStream implementation. If provided +// with a delegate, it delegated calls to it otherwise can be +// used a as a base class for an IStream implementation. +class StreamImpl : public IStream { + public: + StreamImpl() {} + + void Initialize(IStream* delegate); + + STDMETHOD(Write)(const void * buffer, ULONG size, ULONG* size_written); + STDMETHOD(Read)(void* pv, ULONG cb, ULONG* read); + STDMETHOD(Seek)(LARGE_INTEGER move, DWORD origin, ULARGE_INTEGER* new_pos); + STDMETHOD(SetSize)(ULARGE_INTEGER new_size); + STDMETHOD(CopyTo)(IStream* stream, ULARGE_INTEGER cb, ULARGE_INTEGER* read, + ULARGE_INTEGER* written); + STDMETHOD(Commit)(DWORD flags); + STDMETHOD(Revert)(); + STDMETHOD(LockRegion)(ULARGE_INTEGER offset, ULARGE_INTEGER cb, + DWORD type); + STDMETHOD(UnlockRegion)(ULARGE_INTEGER offset, ULARGE_INTEGER cb, + DWORD type); + STDMETHOD(Stat)(STATSTG* statstg, DWORD flag); + STDMETHOD(Clone)(IStream** stream); + + protected: + ScopedComPtr<IStream> delegate_; + + private: + DISALLOW_COPY_AND_ASSIGN(StreamImpl); +}; + +#endif // CHROME_FRAME_STREAM_IMPL_H_ |