Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(462)

Side by Side Diff: chrome_frame/chrome_protocol.cc

Issue 218019: Initial import of the Chrome Frame codebase. Integration in chrome.gyp coming... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome_frame/chrome_protocol.h ('k') | chrome_frame/chrome_protocol.rgs » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2009 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.
4
5 // Implementation of ChromeProtocol
6 #include "chrome_frame/chrome_protocol.h"
7
8 #include "base/logging.h"
9
10 static const wchar_t* kChromeMimeType = L"application/chromepage";
11
12 // ChromeProtocol
13
14 // Starts the class associated with the asynchronous pluggable protocol.
15 STDMETHODIMP ChromeProtocol::Start(LPCWSTR url,
16 IInternetProtocolSink* prot_sink,
17 IInternetBindInfo* bind_info,
18 DWORD flags,
19 DWORD reserved) {
20 DLOG(INFO) << __FUNCTION__ << ": URL = " << url;
21 prot_sink->ReportProgress(BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE,
22 kChromeMimeType);
23 prot_sink->ReportData(
24 BSCF_FIRSTDATANOTIFICATION | BSCF_LASTDATANOTIFICATION |
25 BSCF_DATAFULLYAVAILABLE,
26 0,
27 0);
28 return S_OK;
29 }
30
31 // Allows the pluggable protocol handler to continue processing data on the
32 // apartment (or user interface) thread. This method is called in response
33 // to a call to IInternetProtocolSink::Switch.
34 STDMETHODIMP ChromeProtocol::Continue(PROTOCOLDATA* protocol_data) {
35 DLOG(INFO) << __FUNCTION__;
36 return S_OK;
37 }
38
39 // Aborts an operation in progress.
40 STDMETHODIMP ChromeProtocol::Abort(HRESULT reason, DWORD options) {
41 DLOG(INFO) << __FUNCTION__;
42 return S_OK;
43 }
44
45 STDMETHODIMP ChromeProtocol::Terminate(DWORD options) {
46 DLOG(INFO) << __FUNCTION__;
47 return S_OK;
48 }
49
50 STDMETHODIMP ChromeProtocol::Suspend() {
51 return E_NOTIMPL;
52 }
53 STDMETHODIMP ChromeProtocol::Resume() {
54 return E_NOTIMPL;
55 }
56
57 // Reads data retrieved by the pluggable protocol handler.
58 STDMETHODIMP ChromeProtocol::Read(void* buffer,
59 ULONG buffer_size_in_bytes,
60 ULONG* bytes_read) {
61 DLOG(INFO) << __FUNCTION__;
62 return S_FALSE;
63 }
64
65 // Moves the current seek offset.
66 STDMETHODIMP ChromeProtocol::Seek(LARGE_INTEGER move_by,
67 DWORD origin,
68 ULARGE_INTEGER* new_position) {
69 DLOG(INFO) << __FUNCTION__;
70 return E_NOTIMPL;
71 }
72
73 // Locks the request so that IInternetProtocolRoot::Terminate ()
74 // can be called and the remaining data can be read.
75 STDMETHODIMP ChromeProtocol::LockRequest(DWORD options) {
76 DLOG(INFO) << __FUNCTION__;
77 return S_OK;
78 }
79
80 // Frees any resources associated with a lock. Called only if
81 // IInternetProtocol::LockRequest () was called.
82 STDMETHODIMP ChromeProtocol::UnlockRequest() {
83 DLOG(INFO) << __FUNCTION__;
84 return S_OK;
85 }
OLDNEW
« no previous file with comments | « chrome_frame/chrome_protocol.h ('k') | chrome_frame/chrome_protocol.rgs » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698