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 "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/debug/crash_logging.h" | 10 #include "base/debug/crash_logging.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 : is_broker_(is_broker), | 86 : is_broker_(is_broker), |
87 connect_instance_func_(NULL), | 87 connect_instance_func_(NULL), |
88 local_pp_module_( | 88 local_pp_module_( |
89 base::RandInt(0, std::numeric_limits<PP_Module>::max())), | 89 base::RandInt(0, std::numeric_limits<PP_Module>::max())), |
90 next_plugin_dispatcher_id_(1), | 90 next_plugin_dispatcher_id_(1), |
91 ALLOW_THIS_IN_INITIALIZER_LIST(dispatcher_message_listener_(this)) { | 91 ALLOW_THIS_IN_INITIALIZER_LIST(dispatcher_message_listener_(this)) { |
92 ppapi::proxy::PluginGlobals* globals = ppapi::proxy::PluginGlobals::Get(); | 92 ppapi::proxy::PluginGlobals* globals = ppapi::proxy::PluginGlobals::Get(); |
93 globals->set_plugin_proxy_delegate(this); | 93 globals->set_plugin_proxy_delegate(this); |
94 globals->set_command_line( | 94 globals->set_command_line( |
95 command_line.GetSwitchValueASCII(switches::kPpapiFlashArgs)); | 95 command_line.GetSwitchValueASCII(switches::kPpapiFlashArgs)); |
| 96 globals->set_enable_threading( |
| 97 !command_line.HasSwitch(switches::kDisablePepperThreading)); |
96 | 98 |
97 webkit_platform_support_.reset(new PpapiWebKitPlatformSupportImpl); | 99 webkit_platform_support_.reset(new PpapiWebKitPlatformSupportImpl); |
98 WebKit::initialize(webkit_platform_support_.get()); | 100 WebKit::initialize(webkit_platform_support_.get()); |
99 | 101 |
100 // Register interfaces that expect messages from the browser process. Please | 102 // Register interfaces that expect messages from the browser process. Please |
101 // note that only those InterfaceProxy-based ones require registration. | 103 // note that only those InterfaceProxy-based ones require registration. |
102 AddRoute(ppapi::API_ID_PPB_TCPSERVERSOCKET_PRIVATE, | 104 AddRoute(ppapi::API_ID_PPB_TCPSERVERSOCKET_PRIVATE, |
103 &dispatcher_message_listener_); | 105 &dispatcher_message_listener_); |
104 AddRoute(ppapi::API_ID_PPB_TCPSOCKET_PRIVATE, | 106 AddRoute(ppapi::API_ID_PPB_TCPSOCKET_PRIVATE, |
105 &dispatcher_message_listener_); | 107 &dispatcher_message_listener_); |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 | 463 |
462 // plugin() is NULL when in-process. Which is fine, because this is | 464 // plugin() is NULL when in-process. Which is fine, because this is |
463 // just a hook for setting the process name. | 465 // just a hook for setting the process name. |
464 if (GetContentClient()->plugin()) { | 466 if (GetContentClient()->plugin()) { |
465 GetContentClient()->plugin()->PluginProcessStarted( | 467 GetContentClient()->plugin()->PluginProcessStarted( |
466 path.BaseName().RemoveExtension().LossyDisplayName()); | 468 path.BaseName().RemoveExtension().LossyDisplayName()); |
467 } | 469 } |
468 } | 470 } |
469 | 471 |
470 } // namespace content | 472 } // namespace content |
OLD | NEW |