diff options
author | scheib@chromium.org <scheib@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-26 18:28:30 +0000 |
---|---|---|
committer | scheib@chromium.org <scheib@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-26 18:28:30 +0000 |
commit | 6da661c5aacdd0c6cdbb4a0ac97a305bb5b97534 (patch) | |
tree | 8515acfc2ef5e60d6fea59fbea321f7f39794434 /ppapi/shared_impl | |
parent | e066da3d74766c57ee6239e7902a7e612205f53d (diff) | |
download | chromium_src-6da661c5aacdd0c6cdbb4a0ac97a305bb5b97534.zip chromium_src-6da661c5aacdd0c6cdbb4a0ac97a305bb5b97534.tar.gz chromium_src-6da661c5aacdd0c6cdbb4a0ac97a305bb5b97534.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.
This is the third land of this change - handling DISABLE_NACL builds.
BUG=350510
Review URL: https://codereview.chromium.org/211513002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259637 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/shared_impl')
-rw-r--r-- | ppapi/shared_impl/ppapi_constants.h | 19 | ||||
-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 |
5 files changed, 25 insertions, 5 deletions
diff --git a/ppapi/shared_impl/ppapi_constants.h b/ppapi/shared_impl/ppapi_constants.h new file mode 100644 index 0000000..dcc9b29 --- /dev/null +++ b/ppapi/shared_impl/ppapi_constants.h @@ -0,0 +1,19 @@ +// 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. +const unsigned kKeepaliveThrottleIntervalDefaultMilliseconds = 5000; + +} // 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 |