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

Unified Diff: content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc

Issue 10815073: Refactoring of new IPC-only pepper implementation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
Index: content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc
diff --git a/content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc b/content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc
new file mode 100644
index 0000000000000000000000000000000000000000..8caaaf63f81ef48bac495118e2fc71add3261b80
--- /dev/null
+++ b/content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc
@@ -0,0 +1,37 @@
+// Copyright (c) 2012 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.
+
+#include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h"
+
+#include "ipc/ipc_message_macros.h"
+
+namespace content {
+
+BrowserPpapiHostImpl::BrowserPpapiHostImpl(
+ IPC::Sender* sender,
+ const ppapi::PpapiPermissions& permissions)
+ : host_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)),
+ ppapi_host_(sender, &host_factory_, permissions) {
+}
+
+BrowserPpapiHostImpl::~BrowserPpapiHostImpl() {
+}
+
+bool BrowserPpapiHostImpl::OnMessageReceived(const IPC::Message& msg) {
+ /* TODO(brettw) when we add messages, here, the code should look like this:
+ bool handled = true;
+ IPC_BEGIN_MESSAGE_MAP(BrowserPpapiHostImpl, msg)
+ // Add necessary message handlers here.
+ IPC_MESSAGE_UNHANDLED(handled = ppapi_host_.OnMessageReceived(msg))
+ IPC_END_MESSAGE_MAP();
+ return handled;
+ */
+ return ppapi_host_.OnMessageReceived(msg);
+}
+
+ppapi::host::PpapiHost* BrowserPpapiHostImpl::GetPpapiHost() {
+ return &ppapi_host_;
+}
+
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698