OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ppapi/proxy/host_dispatcher.h" | 5 #include "ppapi/proxy/host_dispatcher.h" |
6 | 6 |
7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "ppapi/c/private/ppb_proxy_private.h" | 9 #include "ppapi/c/private/ppb_proxy_private.h" |
10 #include "ppapi/c/ppb_var.h" | 10 #include "ppapi/c/ppb_var.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 | 80 |
81 ppb_proxy_->SetReserveInstanceIDCallback(pp_module_, &ReserveInstanceID); | 81 ppb_proxy_->SetReserveInstanceIDCallback(pp_module_, &ReserveInstanceID); |
82 } | 82 } |
83 | 83 |
84 HostDispatcher::~HostDispatcher() { | 84 HostDispatcher::~HostDispatcher() { |
85 g_module_to_dispatcher->erase(pp_module_); | 85 g_module_to_dispatcher->erase(pp_module_); |
86 } | 86 } |
87 | 87 |
88 bool HostDispatcher::InitHostWithChannel( | 88 bool HostDispatcher::InitHostWithChannel( |
89 Delegate* delegate, | 89 Delegate* delegate, |
| 90 base::ProcessId peer_pid, |
90 const IPC::ChannelHandle& channel_handle, | 91 const IPC::ChannelHandle& channel_handle, |
91 bool is_client, | 92 bool is_client, |
92 const ppapi::Preferences& preferences) { | 93 const ppapi::Preferences& preferences) { |
93 if (!Dispatcher::InitWithChannel(delegate, channel_handle, is_client)) | 94 if (!Dispatcher::InitWithChannel(delegate, peer_pid, channel_handle, |
| 95 is_client)) |
94 return false; | 96 return false; |
95 AddIOThreadMessageFilter(sync_status_.get()); | 97 AddIOThreadMessageFilter(sync_status_.get()); |
96 | 98 |
97 Send(new PpapiMsg_SetPreferences(preferences)); | 99 Send(new PpapiMsg_SetPreferences(preferences)); |
98 return true; | 100 return true; |
99 } | 101 } |
100 | 102 |
101 // static | 103 // static |
102 HostDispatcher* HostDispatcher::GetForInstance(PP_Instance instance) { | 104 HostDispatcher* HostDispatcher::GetForInstance(PP_Instance instance) { |
103 if (!g_instance_to_dispatcher) | 105 if (!g_instance_to_dispatcher) |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 } | 268 } |
267 } | 269 } |
268 | 270 |
269 ScopedModuleReference::~ScopedModuleReference() { | 271 ScopedModuleReference::~ScopedModuleReference() { |
270 if (dispatcher_) | 272 if (dispatcher_) |
271 dispatcher_->ppb_proxy()->ReleaseModule(dispatcher_->pp_module()); | 273 dispatcher_->ppb_proxy()->ReleaseModule(dispatcher_->pp_module()); |
272 } | 274 } |
273 | 275 |
274 } // namespace proxy | 276 } // namespace proxy |
275 } // namespace ppapi | 277 } // namespace ppapi |
OLD | NEW |