| Index: ppapi/proxy/plugin_main_irt.cc
|
| diff --git a/ppapi/proxy/plugin_main_irt.cc b/ppapi/proxy/plugin_main_irt.cc
|
| index 980cc6ee8ab71d6cb677c48389fbde84dff72f2b..a3ea6c1835ca5fb1afd8540fedcfda73e3dc15af 100644
|
| --- a/ppapi/proxy/plugin_main_irt.cc
|
| +++ b/ppapi/proxy/plugin_main_irt.cc
|
| @@ -32,6 +32,7 @@
|
| #include "ppapi/proxy/plugin_message_filter.h"
|
| #include "ppapi/proxy/plugin_proxy_delegate.h"
|
| #include "ppapi/proxy/resource_reply_thread_registrar.h"
|
| +#include "ppapi/shared_impl/ppapi_switches.h"
|
| #include "ppapi/shared_impl/ppb_audio_shared.h"
|
|
|
| #if defined(__native_client__)
|
| @@ -115,6 +116,8 @@
|
| void OnMsgInitializeNaClDispatcher(const ppapi::PpapiNaClPluginArgs& args);
|
| void OnPluginDispatcherMessageReceived(const IPC::Message& msg);
|
|
|
| + void SetPpapiKeepAliveThrottleFromCommandLine();
|
| +
|
| std::set<PP_Instance> instances_;
|
| std::map<uint32, PluginDispatcher*> plugin_dispatchers_;
|
| uint32 next_plugin_dispatcher_id_;
|
| @@ -246,10 +249,7 @@
|
| logging::LoggingSettings settings;
|
| settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
|
| logging::InitLogging(settings);
|
| -
|
| - ppapi::proxy::PluginGlobals::Get()
|
| - ->set_keepalive_throttle_interval_milliseconds(
|
| - args.keepalive_throttle_interval_milliseconds);
|
| + SetPpapiKeepAliveThrottleFromCommandLine();
|
|
|
| // Tell the process-global GetInterface which interfaces it can return to the
|
| // plugin.
|
| @@ -294,6 +294,18 @@
|
| dispatcher->second->OnMessageReceived(msg);
|
| }
|
|
|
| +void PpapiDispatcher::SetPpapiKeepAliveThrottleFromCommandLine() {
|
| + unsigned keepalive_throttle_interval_milliseconds = 0;
|
| + if (base::StringToUint(
|
| + CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
|
| + switches::kPpapiKeepAliveThrottle),
|
| + &keepalive_throttle_interval_milliseconds)) {
|
| + ppapi::proxy::PluginGlobals::Get()->
|
| + set_keepalive_throttle_interval_milliseconds(
|
| + keepalive_throttle_interval_milliseconds);
|
| + }
|
| +}
|
| +
|
| } // namespace
|
|
|
| void SetIPCFileDescriptors(int ipc_browser_fd, int ipc_renderer_fd) {
|
|
|