| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 } | 54 } |
| 55 private: | 55 private: |
| 56 bool* var_; | 56 bool* var_; |
| 57 bool old_value_; | 57 bool old_value_; |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 } // namespace | 60 } // namespace |
| 61 | 61 |
| 62 HostDispatcher::HostDispatcher(PP_Module module, | 62 HostDispatcher::HostDispatcher(PP_Module module, |
| 63 PP_GetInterface_Func local_get_interface, | 63 PP_GetInterface_Func local_get_interface, |
| 64 SyncMessageStatusReceiver* sync_status) | 64 SyncMessageStatusReceiver* sync_status, |
| 65 : Dispatcher(local_get_interface), | 65 const PpapiPermissions& permissions) |
| 66 : Dispatcher(local_get_interface, permissions), |
| 66 sync_status_(sync_status), | 67 sync_status_(sync_status), |
| 67 pp_module_(module), | 68 pp_module_(module), |
| 68 ppb_proxy_(NULL), | 69 ppb_proxy_(NULL), |
| 69 allow_plugin_reentrancy_(false) { | 70 allow_plugin_reentrancy_(false) { |
| 70 if (!g_module_to_dispatcher) | 71 if (!g_module_to_dispatcher) |
| 71 g_module_to_dispatcher = new ModuleToDispatcherMap; | 72 g_module_to_dispatcher = new ModuleToDispatcherMap; |
| 72 (*g_module_to_dispatcher)[pp_module_] = this; | 73 (*g_module_to_dispatcher)[pp_module_] = this; |
| 73 | 74 |
| 74 SetSerializationRules(new HostVarSerializationRules); | 75 SetSerializationRules(new HostVarSerializationRules); |
| 75 | 76 |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 } | 259 } |
| 259 } | 260 } |
| 260 | 261 |
| 261 ScopedModuleReference::~ScopedModuleReference() { | 262 ScopedModuleReference::~ScopedModuleReference() { |
| 262 if (dispatcher_) | 263 if (dispatcher_) |
| 263 dispatcher_->ppb_proxy()->ReleaseModule(dispatcher_->pp_module()); | 264 dispatcher_->ppb_proxy()->ReleaseModule(dispatcher_->pp_module()); |
| 264 } | 265 } |
| 265 | 266 |
| 266 } // namespace proxy | 267 } // namespace proxy |
| 267 } // namespace ppapi | 268 } // namespace ppapi |
| OLD | NEW |