diff options
author | slightlyoff@chromium.org <slightlyoff@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-24 05:11:58 +0000 |
---|---|---|
committer | slightlyoff@chromium.org <slightlyoff@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-24 05:11:58 +0000 |
commit | f781782dd67077478e117c61dca4ea5eefce3544 (patch) | |
tree | 4801f724123cfdcbb69c4e7fe40a565b331723ae /chrome_frame/chrome_protocol.h | |
parent | 63cf4759efa2373e33436fb5df6849f930081226 (diff) | |
download | chromium_src-f781782dd67077478e117c61dca4ea5eefce3544.zip chromium_src-f781782dd67077478e117c61dca4ea5eefce3544.tar.gz chromium_src-f781782dd67077478e117c61dca4ea5eefce3544.tar.bz2 |
Initial import of the Chrome Frame codebase. Integration in chrome.gyp coming in a separate CL.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/218019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27042 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_protocol.h')
-rw-r--r-- | chrome_frame/chrome_protocol.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/chrome_frame/chrome_protocol.h b/chrome_frame/chrome_protocol.h new file mode 100644 index 0000000..751162b --- /dev/null +++ b/chrome_frame/chrome_protocol.h @@ -0,0 +1,65 @@ +// Copyright (c) 2009 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_CHROME_PROTOCOL_H_ +#define CHROME_FRAME_CHROME_PROTOCOL_H_ + +#include <atlbase.h> +#include <atlcom.h> +#include "chrome_frame/resource.h" +#include "grit/chrome_frame_resources.h" + +// Include without path to make GYP build see it. +#include "chrome_tab.h" // NOLINT + +// ChromeProtocol +class ATL_NO_VTABLE ChromeProtocol + : public CComObjectRootEx<CComSingleThreadModel>, + public CComCoClass<ChromeProtocol, &CLSID_ChromeProtocol>, + public IInternetProtocol { + public: + ChromeProtocol() { + } + DECLARE_REGISTRY_RESOURCEID(IDR_CHROMEPROTOCOL) + + BEGIN_COM_MAP(ChromeProtocol) + COM_INTERFACE_ENTRY(IInternetProtocol) + COM_INTERFACE_ENTRY(IInternetProtocolRoot) + END_COM_MAP() + + DECLARE_PROTECT_FINAL_CONSTRUCT() + + HRESULT FinalConstruct() { + return S_OK; + } + void FinalRelease() { + } + + public: + // IInternetProtocolRoot + STDMETHOD(Start)(LPCWSTR url, + IInternetProtocolSink* prot_sink, + IInternetBindInfo* bind_info, + DWORD flags, + DWORD reserved); + STDMETHOD(Continue)(PROTOCOLDATA* protocol_data); + STDMETHOD(Abort)(HRESULT reason, DWORD options); + STDMETHOD(Terminate)(DWORD options); + STDMETHOD(Suspend)(); + STDMETHOD(Resume)(); + + // IInternetProtocol based on IInternetProtocolRoot + STDMETHOD(Read)(void* buffer, + ULONG buffer_size_in_bytes, + ULONG* bytes_read); + STDMETHOD(Seek)(LARGE_INTEGER move_by, + DWORD origin, + ULARGE_INTEGER* new_position); + STDMETHOD(LockRequest)(DWORD options); + STDMETHOD(UnlockRequest)(void); +}; + +OBJECT_ENTRY_AUTO(__uuidof(ChromeProtocol), ChromeProtocol) + +#endif // CHROME_FRAME_CHROME_PROTOCOL_H_ |