Send activityLogPrivate to stable
[chromium-blink-merge.git] / chrome_frame / chrome_protocol.h
blobf89ac70932c84226db2c52d71dc7c0efbc414b8b
1 // Copyright (c) 2011 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 #ifndef CHROME_FRAME_CHROME_PROTOCOL_H_
6 #define CHROME_FRAME_CHROME_PROTOCOL_H_
8 #include <atlbase.h>
9 #include <atlcom.h>
11 #include "chrome_frame/chrome_tab.h"
12 #include "chrome_frame/resource.h"
13 #include "grit/chrome_frame_resources.h"
15 // ChromeProtocol
16 class ATL_NO_VTABLE ChromeProtocol
17 : public CComObjectRootEx<CComSingleThreadModel>,
18 public CComCoClass<ChromeProtocol, &CLSID_ChromeProtocol>,
19 public IInternetProtocol {
20 public:
21 ChromeProtocol() {
23 DECLARE_REGISTRY_RESOURCEID(IDR_CHROMEPROTOCOL)
25 BEGIN_COM_MAP(ChromeProtocol)
26 COM_INTERFACE_ENTRY(IInternetProtocol)
27 COM_INTERFACE_ENTRY(IInternetProtocolRoot)
28 END_COM_MAP()
30 DECLARE_PROTECT_FINAL_CONSTRUCT()
32 HRESULT FinalConstruct() {
33 return S_OK;
35 void FinalRelease() {
38 public:
39 // IInternetProtocolRoot
40 STDMETHOD(Start)(LPCWSTR url,
41 IInternetProtocolSink* prot_sink,
42 IInternetBindInfo* bind_info,
43 DWORD flags,
44 DWORD reserved);
45 STDMETHOD(Continue)(PROTOCOLDATA* protocol_data);
46 STDMETHOD(Abort)(HRESULT reason, DWORD options);
47 STDMETHOD(Terminate)(DWORD options);
48 STDMETHOD(Suspend)();
49 STDMETHOD(Resume)();
51 // IInternetProtocol based on IInternetProtocolRoot
52 STDMETHOD(Read)(void* buffer,
53 ULONG buffer_size_in_bytes,
54 ULONG* bytes_read);
55 STDMETHOD(Seek)(LARGE_INTEGER move_by,
56 DWORD origin,
57 ULARGE_INTEGER* new_position);
58 STDMETHOD(LockRequest)(DWORD options);
59 STDMETHOD(UnlockRequest)(void);
62 #endif // CHROME_FRAME_CHROME_PROTOCOL_H_