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

Unified Diff: ppapi/proxy/plugin_globals.cc

Issue 2762513002: Remove keep-alive impulse IPCs from NaCl modules. (Closed)
Patch Set: Rebase Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/proxy/plugin_globals.h ('k') | ppapi/proxy/ppapi_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/plugin_globals.cc
diff --git a/ppapi/proxy/plugin_globals.cc b/ppapi/proxy/plugin_globals.cc
index f2ee4efa50067cc23af39f299a9c633953848a46..862031ae05323b74970ffb1f7ec4f213baa73bd8 100644
--- a/ppapi/proxy/plugin_globals.cc
+++ b/ppapi/proxy/plugin_globals.cc
@@ -64,9 +64,6 @@ PluginGlobals::PluginGlobals(
resource_reply_thread_registrar_(
new ResourceReplyThreadRegistrar(GetMainThreadMessageLoop())),
udp_socket_filter_(new UDPSocketFilter()),
- plugin_recently_active_(false),
- keepalive_throttle_interval_milliseconds_(
- ppapi::kKeepaliveThrottleIntervalDefaultMilliseconds),
weak_factory_(this) {
DCHECK(!plugin_globals_);
plugin_globals_ = this;
@@ -88,9 +85,6 @@ PluginGlobals::PluginGlobals(
ipc_task_runner_(ipc_task_runner),
resource_reply_thread_registrar_(
new ResourceReplyThreadRegistrar(GetMainThreadMessageLoop())),
- plugin_recently_active_(false),
- keepalive_throttle_interval_milliseconds_(
- kKeepaliveThrottleIntervalDefaultMilliseconds),
weak_factory_(this) {
DCHECK(!plugin_globals_);
}
@@ -185,22 +179,6 @@ base::TaskRunner* PluginGlobals::GetFileTaskRunner() {
return file_thread_->task_runner().get();
}
-void PluginGlobals::MarkPluginIsActive() {
- if (!plugin_recently_active_) {
- plugin_recently_active_ = true;
- if (!GetBrowserSender() || !base::ThreadTaskRunnerHandle::IsSet())
- return;
- GetBrowserSender()->Send(new PpapiHostMsg_Keepalive());
- DCHECK(keepalive_throttle_interval_milliseconds_);
- GetMainThreadMessageLoop()->PostDelayedTask(
- FROM_HERE,
- RunWhileLocked(base::Bind(&PluginGlobals::OnReleaseKeepaliveThrottle,
- weak_factory_.GetWeakPtr())),
- base::TimeDelta::FromMilliseconds(
- keepalive_throttle_interval_milliseconds_));
- }
-}
-
IPC::Sender* PluginGlobals::GetBrowserSender() {
// CAUTION: This function is called without the ProxyLock. See also
// InterfaceList::GetInterfaceForPPB.
@@ -251,18 +229,9 @@ void PluginGlobals::RegisterResourceMessageFilters(
plugin_filter->AddResourceMessageFilter(udp_socket_filter_.get());
}
-void PluginGlobals::set_keepalive_throttle_interval_milliseconds(unsigned i) {
- keepalive_throttle_interval_milliseconds_ = i;
-}
-
bool PluginGlobals::IsPluginGlobals() const {
return true;
}
-void PluginGlobals::OnReleaseKeepaliveThrottle() {
- ppapi::ProxyLock::AssertAcquiredDebugOnly();
- plugin_recently_active_ = false;
-}
-
} // namespace proxy
} // namespace ppapi
« no previous file with comments | « ppapi/proxy/plugin_globals.h ('k') | ppapi/proxy/ppapi_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698