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

Side by Side Diff: content/ppapi_plugin/ppapi_thread.cc

Issue 11659032: Enable Pepper threading on all channels. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 11 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
« no previous file with comments | « content/browser/ppapi_plugin_process_host.cc ('k') | webkit/plugins/plugin_switches.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 "content/ppapi_plugin/ppapi_thread.h" 5 #include "content/ppapi_plugin/ppapi_thread.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 : is_broker_(is_broker), 82 : is_broker_(is_broker),
83 connect_instance_func_(NULL), 83 connect_instance_func_(NULL),
84 local_pp_module_( 84 local_pp_module_(
85 base::RandInt(0, std::numeric_limits<PP_Module>::max())), 85 base::RandInt(0, std::numeric_limits<PP_Module>::max())),
86 next_plugin_dispatcher_id_(1), 86 next_plugin_dispatcher_id_(1),
87 ALLOW_THIS_IN_INITIALIZER_LIST(dispatcher_message_listener_(this)) { 87 ALLOW_THIS_IN_INITIALIZER_LIST(dispatcher_message_listener_(this)) {
88 ppapi::proxy::PluginGlobals* globals = ppapi::proxy::PluginGlobals::Get(); 88 ppapi::proxy::PluginGlobals* globals = ppapi::proxy::PluginGlobals::Get();
89 globals->set_plugin_proxy_delegate(this); 89 globals->set_plugin_proxy_delegate(this);
90 globals->set_command_line( 90 globals->set_command_line(
91 command_line.GetSwitchValueASCII(switches::kPpapiFlashArgs)); 91 command_line.GetSwitchValueASCII(switches::kPpapiFlashArgs));
92 if (command_line.HasSwitch(switches::kDisablePepperThreading)) { 92 globals->set_enable_threading(
93 globals->set_enable_threading(false); 93 !command_line.HasSwitch(switches::kDisablePepperThreading));
94 } else if (command_line.HasSwitch(switches::kEnablePepperThreading)) {
95 globals->set_enable_threading(true);
96 } else {
97 globals->set_enable_threading(false);
98 }
99 94
100 webkit_platform_support_.reset(new PpapiWebKitPlatformSupportImpl); 95 webkit_platform_support_.reset(new PpapiWebKitPlatformSupportImpl);
101 WebKit::initialize(webkit_platform_support_.get()); 96 WebKit::initialize(webkit_platform_support_.get());
102 97
103 // Register interfaces that expect messages from the browser process. Please 98 // Register interfaces that expect messages from the browser process. Please
104 // note that only those InterfaceProxy-based ones require registration. 99 // note that only those InterfaceProxy-based ones require registration.
105 AddRoute(ppapi::API_ID_PPB_TCPSERVERSOCKET_PRIVATE, 100 AddRoute(ppapi::API_ID_PPB_TCPSERVERSOCKET_PRIVATE,
106 &dispatcher_message_listener_); 101 &dispatcher_message_listener_);
107 AddRoute(ppapi::API_ID_PPB_TCPSOCKET_PRIVATE, 102 AddRoute(ppapi::API_ID_PPB_TCPSOCKET_PRIVATE,
108 &dispatcher_message_listener_); 103 &dispatcher_message_listener_);
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 440
446 // plugin() is NULL when in-process. Which is fine, because this is 441 // plugin() is NULL when in-process. Which is fine, because this is
447 // just a hook for setting the process name. 442 // just a hook for setting the process name.
448 if (GetContentClient()->plugin()) { 443 if (GetContentClient()->plugin()) {
449 GetContentClient()->plugin()->PluginProcessStarted( 444 GetContentClient()->plugin()->PluginProcessStarted(
450 path.BaseName().RemoveExtension().LossyDisplayName()); 445 path.BaseName().RemoveExtension().LossyDisplayName());
451 } 446 }
452 } 447 }
453 448
454 } // namespace content 449 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/ppapi_plugin_process_host.cc ('k') | webkit/plugins/plugin_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698