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

Unified Diff: base/timer.h

Issue 4262: Stop spamming delayed tasks on each input event. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 3 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 | « no previous file | chrome/browser/render_view_host.cc » ('j') | chrome/browser/render_widget_host.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/timer.h
===================================================================
--- base/timer.h (revision 2551)
+++ base/timer.h (working copy)
@@ -66,6 +66,13 @@
return delayed_task_ != NULL;
}
+ // Returns the current delay for this timer. May only call this method when
+ // the timer is running!
+ TimeDelta GetCurrentDelay() const {
+ DCHECK(IsRunning());
+ return delayed_task_->delay_;
+ }
+
protected:
BaseTimer_Helper() : delayed_task_(NULL) {}
« no previous file with comments | « no previous file | chrome/browser/render_view_host.cc » ('j') | chrome/browser/render_widget_host.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698