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

Side by Side Diff: ppapi/proxy/host_dispatcher.cc

Issue 10984094: Hook up PpapiPermissions in more places. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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
« no previous file with comments | « ppapi/proxy/host_dispatcher.h ('k') | ppapi/proxy/interface_list.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ppapi/proxy/host_dispatcher.h ('k') | ppapi/proxy/interface_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698