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

Unified Diff: base/message_loop/message_loop.h

Issue 289863005: [Mac] Maximise timer slack for background tabs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Really rebase Created 6 years, 6 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 | « base/base.gypi ('k') | base/message_loop/message_pump.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop/message_loop.h
diff --git a/base/message_loop/message_loop.h b/base/message_loop/message_loop.h
index 165299d53d0fb70220ab97e80c0a043cffbd7a42..22d4f7395e4c516ed3de88b5543208e9b98ce9ea 100644
--- a/base/message_loop/message_loop.h
+++ b/base/message_loop/message_loop.h
@@ -18,6 +18,7 @@
#include "base/message_loop/message_loop_proxy.h"
#include "base/message_loop/message_loop_proxy_impl.h"
#include "base/message_loop/message_pump.h"
+#include "base/message_loop/timer_slack.h"
#include "base/observer_list.h"
#include "base/pending_task.h"
#include "base/sequenced_task_runner_helpers.h"
@@ -274,6 +275,11 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
// arbitrary MessageLoop to QuitWhenIdle.
static Closure QuitWhenIdleClosure();
+ // Set the timer slack for this message loop.
+ void SetTimerSlack(TimerSlack timer_slack) {
+ pump_->SetTimerSlack(timer_slack);
+ }
+
// Returns true if this loop is |type|. This allows subclasses (especially
// those in tests) to specialize how they are identified.
virtual bool IsType(Type type) const;
« no previous file with comments | « base/base.gypi ('k') | base/message_loop/message_pump.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698