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

Unified Diff: ui/views/view.h

Issue 129863002: Makes View::focusable() return last value supplied to SetFocusable() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix views_examples Created 6 years, 11 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/examples/button_example.cc ('k') | ui/views/view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/view.h
diff --git a/ui/views/view.h b/ui/views/view.h
index 3dfa2205ed982d8c7a46ec87d23f838fad3d9b7b..aba1194ea2f5b1ed3a77d42604437a39e2e6df84 100644
--- a/ui/views/view.h
+++ b/ui/views/view.h
@@ -773,9 +773,6 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
// not get the focus.
void SetFocusable(bool focusable);
- // Returns true if this view is capable of taking focus.
- bool focusable() const { return focusable_ && enabled_ && visible_; }
-
// Returns true if this view is |focusable_|, |enabled_| and drawn.
virtual bool IsFocusable() const;
@@ -1142,6 +1139,10 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
// Focus ---------------------------------------------------------------------
+ // Returns last value passed to SetFocusable(). Use IsFocusable() to determine
+ // if a view can take focus right now.
+ bool focusable() const { return focusable_; }
+
// Override to be notified when focus has changed either to or from this View.
virtual void OnFocus();
virtual void OnBlur();
« no previous file with comments | « ui/views/examples/button_example.cc ('k') | ui/views/view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698