OLD | NEW |
(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 |
OLD | NEW |