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

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

Issue 10378057: Broker out PPAPI handle duplication (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 7 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/plugin_dispatcher.h ('k') | ppapi/proxy/ppapi_messages.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/plugin_dispatcher.h" 5 #include "ppapi/proxy/plugin_dispatcher.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 InstanceData::~InstanceData() { 52 InstanceData::~InstanceData() {
53 // Run any pending mouse lock callback to prevent leaks. 53 // Run any pending mouse lock callback to prevent leaks.
54 if (mouse_lock_callback.func) { 54 if (mouse_lock_callback.func) {
55 CallWhileUnlocked(PP_RunAndClearCompletionCallback, 55 CallWhileUnlocked(PP_RunAndClearCompletionCallback,
56 &mouse_lock_callback, 56 &mouse_lock_callback,
57 static_cast<int32_t>(PP_ERROR_ABORTED)); 57 static_cast<int32_t>(PP_ERROR_ABORTED));
58 } 58 }
59 } 59 }
60 60
61 PluginDispatcher::PluginDispatcher(base::ProcessHandle remote_process_handle, 61 PluginDispatcher::PluginDispatcher(PP_GetInterface_Func get_interface,
62 PP_GetInterface_Func get_interface,
63 bool incognito) 62 bool incognito)
64 : Dispatcher(remote_process_handle, get_interface), 63 : Dispatcher(get_interface),
65 plugin_delegate_(NULL), 64 plugin_delegate_(NULL),
66 received_preferences_(false), 65 received_preferences_(false),
67 plugin_dispatcher_id_(0), 66 plugin_dispatcher_id_(0),
68 incognito_(incognito) { 67 incognito_(incognito) {
69 SetSerializationRules(new PluginVarSerializationRules(AsWeakPtr())); 68 SetSerializationRules(new PluginVarSerializationRules(AsWeakPtr()));
70 69
71 if (!g_live_dispatchers) 70 if (!g_live_dispatchers)
72 g_live_dispatchers = new DispatcherSet; 71 g_live_dispatchers = new DispatcherSet;
73 g_live_dispatchers->insert(this); 72 g_live_dispatchers->insert(this);
74 } 73 }
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 // once they're set. The user will have to restart to get new font prefs 298 // once they're set. The user will have to restart to get new font prefs
300 // propogated to plugins. 299 // propogated to plugins.
301 if (!received_preferences_) { 300 if (!received_preferences_) {
302 received_preferences_ = true; 301 received_preferences_ = true;
303 preferences_ = prefs; 302 preferences_ = prefs;
304 } 303 }
305 } 304 }
306 305
307 } // namespace proxy 306 } // namespace proxy
308 } // namespace ppapi 307 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/plugin_dispatcher.h ('k') | ppapi/proxy/ppapi_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698