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

Unified Diff: ui/views/controls/throbber.cc

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: fixcaller Created 5 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 | « ui/views/controls/throbber.h ('k') | ui/views/corewm/tooltip_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/throbber.cc
diff --git a/ui/views/controls/throbber.cc b/ui/views/controls/throbber.cc
index 635ff88a0bb12128d38d4db13b458ed804da64ac..5970290808ac0770ee45973ed4b55411672ed742 100644
--- a/ui/views/controls/throbber.cc
+++ b/ui/views/controls/throbber.cc
@@ -4,6 +4,8 @@
#include "ui/views/controls/throbber.h"
+#include "base/bind.h"
+#include "base/location.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/animation/tween.h"
#include "ui/gfx/canvas.h"
@@ -39,8 +41,8 @@ void Throbber::Start() {
start_time_ = base::TimeTicks::Now();
const int kFrameTimeMs = 30;
- timer_.Start(FROM_HERE, base::TimeDelta::FromMilliseconds(kFrameTimeMs), this,
- &Throbber::SchedulePaint);
+ timer_.Start(FROM_HERE, base::TimeDelta::FromMilliseconds(kFrameTimeMs),
+ base::Bind(&Throbber::SchedulePaint, base::Unretained(this)));
SchedulePaint(); // paint right away
}
« no previous file with comments | « ui/views/controls/throbber.h ('k') | ui/views/corewm/tooltip_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698