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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome_frame/chrome_protocol.h ('k') | chrome_frame/chrome_protocol.rgs » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/chrome_protocol.cc
===================================================================
--- chrome_frame/chrome_protocol.cc (revision 0)
+++ chrome_frame/chrome_protocol.cc (revision 0)
@@ -0,0 +1,85 @@
+// 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.
+
+// Implementation of ChromeProtocol
+#include "chrome_frame/chrome_protocol.h"
+
+#include "base/logging.h"
+
+static const wchar_t* kChromeMimeType = L"application/chromepage";
+
+// ChromeProtocol
+
+// Starts the class associated with the asynchronous pluggable protocol.
+STDMETHODIMP ChromeProtocol::Start(LPCWSTR url,
+ IInternetProtocolSink* prot_sink,
+ IInternetBindInfo* bind_info,
+ DWORD flags,
+ DWORD reserved) {
+ DLOG(INFO) << __FUNCTION__ << ": URL = " << url;
+ prot_sink->ReportProgress(BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE,
+ kChromeMimeType);
+ prot_sink->ReportData(
+ BSCF_FIRSTDATANOTIFICATION | BSCF_LASTDATANOTIFICATION |
+ BSCF_DATAFULLYAVAILABLE,
+ 0,
+ 0);
+ return S_OK;
+}
+
+// Allows the pluggable protocol handler to continue processing data on the
+// apartment (or user interface) thread. This method is called in response
+// to a call to IInternetProtocolSink::Switch.
+STDMETHODIMP ChromeProtocol::Continue(PROTOCOLDATA* protocol_data) {
+ DLOG(INFO) << __FUNCTION__;
+ return S_OK;
+}
+
+// Aborts an operation in progress.
+STDMETHODIMP ChromeProtocol::Abort(HRESULT reason, DWORD options) {
+ DLOG(INFO) << __FUNCTION__;
+ return S_OK;
+}
+
+STDMETHODIMP ChromeProtocol::Terminate(DWORD options) {
+ DLOG(INFO) << __FUNCTION__;
+ return S_OK;
+}
+
+STDMETHODIMP ChromeProtocol::Suspend() {
+ return E_NOTIMPL;
+}
+STDMETHODIMP ChromeProtocol::Resume() {
+ return E_NOTIMPL;
+}
+
+// Reads data retrieved by the pluggable protocol handler.
+STDMETHODIMP ChromeProtocol::Read(void* buffer,
+ ULONG buffer_size_in_bytes,
+ ULONG* bytes_read) {
+ DLOG(INFO) << __FUNCTION__;
+ return S_FALSE;
+}
+
+// Moves the current seek offset.
+STDMETHODIMP ChromeProtocol::Seek(LARGE_INTEGER move_by,
+ DWORD origin,
+ ULARGE_INTEGER* new_position) {
+ DLOG(INFO) << __FUNCTION__;
+ return E_NOTIMPL;
+}
+
+// Locks the request so that IInternetProtocolRoot::Terminate ()
+// can be called and the remaining data can be read.
+STDMETHODIMP ChromeProtocol::LockRequest(DWORD options) {
+ DLOG(INFO) << __FUNCTION__;
+ return S_OK;
+}
+
+// Frees any resources associated with a lock. Called only if
+// IInternetProtocol::LockRequest () was called.
+STDMETHODIMP ChromeProtocol::UnlockRequest() {
+ DLOG(INFO) << __FUNCTION__;
+ return S_OK;
+}
« 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