Update expectations after WebKit roll.
[chromium-blink-merge.git] / chrome_frame / chrome_protocol.cc
blob87ca34eb4a8c5cfb0050a6b2a983e5ce941e6e3c
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.
5 // Implementation of ChromeProtocol
6 #include "chrome_frame/chrome_protocol.h"
8 #include "base/logging.h"
10 static const wchar_t* kChromeMimeType = L"application/chromepage";
12 // ChromeProtocol
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,
27 0);
28 return S_OK;
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;
39 // Aborts an operation in progress.
40 STDMETHODIMP ChromeProtocol::Abort(HRESULT reason, DWORD options) {
41 DLOG(INFO) << __FUNCTION__;
42 return S_OK;
45 STDMETHODIMP ChromeProtocol::Terminate(DWORD options) {
46 DLOG(INFO) << __FUNCTION__;
47 return S_OK;
50 STDMETHODIMP ChromeProtocol::Suspend() {
51 return E_NOTIMPL;
53 STDMETHODIMP ChromeProtocol::Resume() {
54 return E_NOTIMPL;
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;
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;
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;
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;