diff options
author | scheib@chromium.org <scheib@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-12 05:08:50 +0000 |
---|---|---|
committer | scheib@chromium.org <scheib@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-12 05:08:50 +0000 |
commit | 96282a0c6ef6ceabac242bca230b41a9a3b51188 (patch) | |
tree | 880897c7d22b7faad795a50ee36b11f2a9c7f8bf /ppapi/shared_impl | |
parent | e4e522d2a6bf3d977400f2eaba3682c32fcb65f9 (diff) | |
download | chromium_src-96282a0c6ef6ceabac242bca230b41a9a3b51188.zip chromium_src-96282a0c6ef6ceabac242bca230b41a9a3b51188.tar.gz chromium_src-96282a0c6ef6ceabac242bca230b41a9a3b51188.tar.bz2 |
Replace --ppapi-keep-alive-throttle command line switch with IPC parameter.
Part of a broad effort to reduce the number of command line switches.
BUG=350510
Review URL: https://codereview.chromium.org/191633002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256436 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/shared_impl')
-rw-r--r-- | ppapi/shared_impl/ppapi_constants.cc | 11 | ||||
-rw-r--r-- | ppapi/shared_impl/ppapi_constants.h | 20 | ||||
-rw-r--r-- | ppapi/shared_impl/ppapi_nacl_plugin_args.cc | 6 | ||||
-rw-r--r-- | ppapi/shared_impl/ppapi_nacl_plugin_args.h | 1 | ||||
-rw-r--r-- | ppapi/shared_impl/ppapi_switches.cc | 3 | ||||
-rw-r--r-- | ppapi/shared_impl/ppapi_switches.h | 1 |
6 files changed, 37 insertions, 5 deletions
diff --git a/ppapi/shared_impl/ppapi_constants.cc b/ppapi/shared_impl/ppapi_constants.cc new file mode 100644 index 0000000..6962513 --- /dev/null +++ b/ppapi/shared_impl/ppapi_constants.cc @@ -0,0 +1,11 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ppapi/shared_impl/ppapi_constants.h" + +namespace ppapi { + +const unsigned kKeepaliveThrottleIntervalDefaultMilliseconds = 5000; + +} // namespace ppapi diff --git a/ppapi/shared_impl/ppapi_constants.h b/ppapi/shared_impl/ppapi_constants.h new file mode 100644 index 0000000..9faf18d --- /dev/null +++ b/ppapi/shared_impl/ppapi_constants.h @@ -0,0 +1,20 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef PPAPI_SHARED_IMPL_PPAPI_CONSTANTS_H_ +#define PPAPI_SHARED_IMPL_PPAPI_CONSTANTS_H_ + +#include "ppapi/shared_impl/ppapi_shared_export.h" + +namespace ppapi { + +// Default interval to space out IPC messages sent indicating that a plugin is +// active and should be kept alive. The value must be smaller than any threshold +// used to kill inactive plugins by the embedder host. +PPAPI_SHARED_EXPORT extern const unsigned + kKeepaliveThrottleIntervalDefaultMilliseconds; + +} // namespace ppapi + +#endif // PPAPI_SHARED_IMPL_PPAPI_CONSTANTS_H_ diff --git a/ppapi/shared_impl/ppapi_nacl_plugin_args.cc b/ppapi/shared_impl/ppapi_nacl_plugin_args.cc index 92df690..4dd5110 100644 --- a/ppapi/shared_impl/ppapi_nacl_plugin_args.cc +++ b/ppapi/shared_impl/ppapi_nacl_plugin_args.cc @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "ppapi/shared_impl/ppapi_constants.h" #include "ppapi/shared_impl/ppapi_nacl_plugin_args.h" namespace ppapi { @@ -9,7 +10,10 @@ namespace ppapi { // We must provide explicit definitions of these functions for builds on // Windows. PpapiNaClPluginArgs::PpapiNaClPluginArgs() - : off_the_record(false), supports_dev_channel(false) {} + : off_the_record(false), + supports_dev_channel(false), + keepalive_throttle_interval_milliseconds( + kKeepaliveThrottleIntervalDefaultMilliseconds) {} PpapiNaClPluginArgs::~PpapiNaClPluginArgs() {} diff --git a/ppapi/shared_impl/ppapi_nacl_plugin_args.h b/ppapi/shared_impl/ppapi_nacl_plugin_args.h index 2f18c8e..993131d 100644 --- a/ppapi/shared_impl/ppapi_nacl_plugin_args.h +++ b/ppapi/shared_impl/ppapi_nacl_plugin_args.h @@ -20,6 +20,7 @@ struct PPAPI_SHARED_EXPORT PpapiNaClPluginArgs { bool off_the_record; PpapiPermissions permissions; bool supports_dev_channel; + unsigned keepalive_throttle_interval_milliseconds; // Switches from the command-line. std::vector<std::string> switch_names; diff --git a/ppapi/shared_impl/ppapi_switches.cc b/ppapi/shared_impl/ppapi_switches.cc index 2a3f1c28..84ba250 100644 --- a/ppapi/shared_impl/ppapi_switches.cc +++ b/ppapi/shared_impl/ppapi_switches.cc @@ -9,7 +9,4 @@ namespace switches { // Enables the testing interface for PPAPI. const char kEnablePepperTesting[] = "enable-pepper-testing"; -// Specifies throttling time in milliseconds for PpapiHostMsg_Keepalive IPCs. -const char kPpapiKeepAliveThrottle[] = "ppapi-keep-alive-throttle"; - } // namespace switches diff --git a/ppapi/shared_impl/ppapi_switches.h b/ppapi/shared_impl/ppapi_switches.h index 4fb9c3481..a5c8e9d 100644 --- a/ppapi/shared_impl/ppapi_switches.h +++ b/ppapi/shared_impl/ppapi_switches.h @@ -10,7 +10,6 @@ namespace switches { PPAPI_SHARED_EXPORT extern const char kEnablePepperTesting[]; -PPAPI_SHARED_EXPORT extern const char kPpapiKeepAliveThrottle[]; } // namespace switches |