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

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

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
Index: ui/views/controls/throbber.h
diff --git a/ui/views/controls/throbber.h b/ui/views/controls/throbber.h
index 27652cf12110dd741c8c06f5752232e4c6dd37d9..de942ec2463e39837d9f1b0b75469ca32bce6042 100644
--- a/ui/views/controls/throbber.h
+++ b/ui/views/controls/throbber.h
@@ -36,9 +36,12 @@ class VIEWS_EXPORT Throbber : public View {
// Set custom throbber frames. Otherwise IDR_THROBBER is loaded.
void SetFrames(const gfx::ImageSkia* frames);
+ void set_interactive(bool interactive) { interactive_ = interactive; }
+
// Overridden from View:
virtual gfx::Size GetPreferredSize() OVERRIDE;
virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
+ virtual bool HitTestRect(const gfx::Rect& rect) const OVERRIDE;
sadrul 2013/02/05 02:31:42 You can do this by overriding HasHitTestMask too.
protected:
// Specifies whether the throbber is currently animating or not
@@ -54,6 +57,9 @@ class VIEWS_EXPORT Throbber : public View {
base::TimeDelta frame_time_; // How long one frame is displayed.
base::RepeatingTimer<Throbber> timer_; // Used to schedule Run calls.
+ // A flag controlling hit test handling for interactivity.
+ bool interactive_;
+
DISALLOW_COPY_AND_ASSIGN(Throbber);
};

Powered by Google App Engine
This is Rietveld 408576698