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

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

Issue 8371008: Revert 106717 - Revert 106677 (caused several PPAPI test timeouts, see http://crbug.com/101154) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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/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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 24 matching lines...) Expand all
35 namespace proxy { 35 namespace proxy {
36 36
37 namespace { 37 namespace {
38 38
39 typedef std::map<PP_Instance, PluginDispatcher*> InstanceToDispatcherMap; 39 typedef std::map<PP_Instance, PluginDispatcher*> InstanceToDispatcherMap;
40 InstanceToDispatcherMap* g_instance_to_dispatcher = NULL; 40 InstanceToDispatcherMap* g_instance_to_dispatcher = NULL;
41 41
42 } // namespace 42 } // namespace
43 43
44 InstanceData::InstanceData() 44 InstanceData::InstanceData()
45 : fullscreen(PP_FALSE), flash_fullscreen(PP_FALSE) { 45 : fullscreen(PP_FALSE),
46 flash_fullscreen(PP_FALSE),
47 mouse_lock_callback(PP_BlockUntilComplete()) {
46 memset(&position, 0, sizeof(position)); 48 memset(&position, 0, sizeof(position));
47 } 49 }
48 50
51 InstanceData::~InstanceData() {
52 // Run any pending mouse lock callback to prevent leaks.
53 if (mouse_lock_callback.func)
54 PP_RunAndClearCompletionCallback(&mouse_lock_callback, PP_ERROR_ABORTED);
55 }
56
49 PluginDispatcher::PluginDispatcher(base::ProcessHandle remote_process_handle, 57 PluginDispatcher::PluginDispatcher(base::ProcessHandle remote_process_handle,
50 GetInterfaceFunc get_interface) 58 GetInterfaceFunc get_interface)
51 : Dispatcher(remote_process_handle, get_interface), 59 : Dispatcher(remote_process_handle, get_interface),
52 plugin_delegate_(NULL), 60 plugin_delegate_(NULL),
53 received_preferences_(false), 61 received_preferences_(false),
54 plugin_dispatcher_id_(0) { 62 plugin_dispatcher_id_(0) {
55 SetSerializationRules(new PluginVarSerializationRules); 63 SetSerializationRules(new PluginVarSerializationRules);
56 } 64 }
57 65
58 PluginDispatcher::~PluginDispatcher() { 66 PluginDispatcher::~PluginDispatcher() {
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 // once they're set. The user will have to restart to get new font prefs 244 // once they're set. The user will have to restart to get new font prefs
237 // propogated to plugins. 245 // propogated to plugins.
238 if (!received_preferences_) { 246 if (!received_preferences_) {
239 received_preferences_ = true; 247 received_preferences_ = true;
240 preferences_ = prefs; 248 preferences_ = prefs;
241 } 249 }
242 } 250 }
243 251
244 } // namespace proxy 252 } // namespace proxy
245 } // namespace ppapi 253 } // 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