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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 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 #include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h"
6
7 #include "ipc/ipc_message_macros.h"
8
9 namespace content {
10
11 BrowserPpapiHostImpl::BrowserPpapiHostImpl(
12 IPC::Sender* sender,
13 const ppapi::PpapiPermissions& permissions)
14 : host_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)),
15 ppapi_host_(sender, &host_factory_, permissions) {
16 }
17
18 BrowserPpapiHostImpl::~BrowserPpapiHostImpl() {
19 }
20
21 bool BrowserPpapiHostImpl::OnMessageReceived(const IPC::Message& msg) {
22 /* TODO(brettw) when we add messages, here, the code should look like this:
23 bool handled = true;
24 IPC_BEGIN_MESSAGE_MAP(BrowserPpapiHostImpl, msg)
25 // Add necessary message handlers here.
26 IPC_MESSAGE_UNHANDLED(handled = ppapi_host_.OnMessageReceived(msg))
27 IPC_END_MESSAGE_MAP();
28 return handled;
29 */
30 return ppapi_host_.OnMessageReceived(msg);
31 }
32
33 ppapi::host::PpapiHost* BrowserPpapiHostImpl::GetPpapiHost() {
34 return &ppapi_host_;
35 }
36
37 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698