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

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

Issue 12180027: Add spinner UI to show bluetooth is discovering devices. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
« ui/views/controls/throbber.h ('K') | « ui/views/controls/throbber.h ('k') | no next file » | 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 75d70fbfafc1053c24c302f03721160eea905867..6c576223844121f25cea9830aaa79038982e328c 100644
--- a/ui/views/controls/throbber.cc
+++ b/ui/views/controls/throbber.cc
@@ -21,7 +21,8 @@ Throbber::Throbber(int frame_time_ms,
: running_(false),
paint_while_stopped_(paint_while_stopped),
frames_(NULL),
- frame_time_(TimeDelta::FromMilliseconds(frame_time_ms)) {
+ frame_time_(TimeDelta::FromMilliseconds(frame_time_ms)),
+ interactive_(true) {
SetFrames(ui::ResourceBundle::GetSharedInstance().GetImageNamed(
IDR_THROBBER).ToImageSkia());
}
@@ -88,7 +89,9 @@ void Throbber::OnPaint(gfx::Canvas* canvas) {
false);
}
-
+bool Throbber::HitTestRect(const gfx::Rect& rect) const {
+ return interactive_ ? View::HitTestRect(rect) : false;
sky 2013/02/05 15:58:52 Why do you need this? Rather than adding set_inter
jennyz 2013/02/05 17:37:20 Yes, you are right, I can just use set_enabled, re
+}
// Smoothed throbber ---------------------------------------------------------
« ui/views/controls/throbber.h ('K') | « ui/views/controls/throbber.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698