Add tests to verify accelerators properly work on constrained window.
[chromium-blink-merge.git] / chrome_frame / chrome_protocol.cc
blob42683bcf0bcf55ed092c023cab79b1b5282b28e7
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"
9 #include "chrome_frame/utils.h"
11 // ChromeProtocol
13 // Starts the class associated with the asynchronous pluggable protocol.
14 STDMETHODIMP ChromeProtocol::Start(LPCWSTR url,
15 IInternetProtocolSink* prot_sink,
16 IInternetBindInfo* bind_info,
17 DWORD flags,
18 DWORD reserved) {
19 DVLOG(1) << __FUNCTION__ << ": URL = " << url;
20 prot_sink->ReportProgress(BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE,
21 kChromeMimeType);
22 prot_sink->ReportData(
23 BSCF_FIRSTDATANOTIFICATION | BSCF_LASTDATANOTIFICATION |
24 BSCF_DATAFULLYAVAILABLE,
26 0);
27 return S_OK;
30 // Allows the pluggable protocol handler to continue processing data on the
31 // apartment (or user interface) thread. This method is called in response
32 // to a call to IInternetProtocolSink::Switch.
33 STDMETHODIMP ChromeProtocol::Continue(PROTOCOLDATA* protocol_data) {
34 DVLOG(1) << __FUNCTION__;
35 return S_OK;
38 // Aborts an operation in progress.
39 STDMETHODIMP ChromeProtocol::Abort(HRESULT reason, DWORD options) {
40 DVLOG(1) << __FUNCTION__;
41 return S_OK;
44 STDMETHODIMP ChromeProtocol::Terminate(DWORD options) {
45 DVLOG(1) << __FUNCTION__;
46 return S_OK;
49 STDMETHODIMP ChromeProtocol::Suspend() {
50 return E_NOTIMPL;
52 STDMETHODIMP ChromeProtocol::Resume() {
53 return E_NOTIMPL;
56 // Reads data retrieved by the pluggable protocol handler.
57 STDMETHODIMP ChromeProtocol::Read(void* buffer,
58 ULONG buffer_size_in_bytes,
59 ULONG* bytes_read) {
60 DVLOG(1) << __FUNCTION__;
61 return S_FALSE;
64 // Moves the current seek offset.
65 STDMETHODIMP ChromeProtocol::Seek(LARGE_INTEGER move_by,
66 DWORD origin,
67 ULARGE_INTEGER* new_position) {
68 DVLOG(1) << __FUNCTION__;
69 return E_NOTIMPL;
72 // Locks the request so that IInternetProtocolRoot::Terminate ()
73 // can be called and the remaining data can be read.
74 STDMETHODIMP ChromeProtocol::LockRequest(DWORD options) {
75 DVLOG(1) << __FUNCTION__;
76 return S_OK;
79 // Frees any resources associated with a lock. Called only if
80 // IInternetProtocol::LockRequest () was called.
81 STDMETHODIMP ChromeProtocol::UnlockRequest() {
82 DVLOG(1) << __FUNCTION__;
83 return S_OK;