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

Side by Side Diff: ui/views/view.h

Issue 8996009: views: Rename IsFocusableInRootView() to just IsFocusable(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/views/focus/focus_search.cc ('k') | ui/views/view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_VIEWS_VIEW_H_ 5 #ifndef UI_VIEWS_VIEW_H_
6 #define UI_VIEWS_VIEW_H_ 6 #define UI_VIEWS_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 void SetNextFocusableView(View* view); 662 void SetNextFocusableView(View* view);
663 663
664 // Sets whether this view is capable of taking focus. 664 // Sets whether this view is capable of taking focus.
665 // Note that this is false by default so that a view used as a container does 665 // Note that this is false by default so that a view used as a container does
666 // not get the focus. 666 // not get the focus.
667 void set_focusable(bool focusable) { focusable_ = focusable; } 667 void set_focusable(bool focusable) { focusable_ = focusable; }
668 668
669 // Returns true if this view is capable of taking focus. 669 // Returns true if this view is capable of taking focus.
670 bool focusable() const { return focusable_ && enabled_ && visible_; } 670 bool focusable() const { return focusable_ && enabled_ && visible_; }
671 671
672 // Returns true if the view is focusable (IsFocusable) and visible in the root 672 // Returns true if this view is |focusable_|, |enabled_| and drawn.
673 // view. See also IsFocusable. 673 virtual bool IsFocusable() const;
674 virtual bool IsFocusableInRootView() const;
675 674
676 // Return whether this view is focusable when the user requires full keyboard 675 // Return whether this view is focusable when the user requires full keyboard
677 // access, even though it may not be normally focusable. 676 // access, even though it may not be normally focusable.
678 bool IsAccessibilityFocusableInRootView() const; 677 bool IsAccessibilityFocusableInRootView() const;
679 678
680 // Set whether this view can be made focusable if the user requires 679 // Set whether this view can be made focusable if the user requires
681 // full keyboard access, even though it's not normally focusable. 680 // full keyboard access, even though it's not normally focusable.
682 // Note that this is false by default. 681 // Note that this is false by default.
683 void set_accessibility_focusable(bool accessibility_focusable) { 682 void set_accessibility_focusable(bool accessibility_focusable) {
684 accessibility_focusable_ = accessibility_focusable; 683 accessibility_focusable_ = accessibility_focusable;
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
1427 base::win::ScopedComPtr<NativeViewAccessibilityWin> 1426 base::win::ScopedComPtr<NativeViewAccessibilityWin>
1428 native_view_accessibility_win_; 1427 native_view_accessibility_win_;
1429 #endif 1428 #endif
1430 1429
1431 DISALLOW_COPY_AND_ASSIGN(View); 1430 DISALLOW_COPY_AND_ASSIGN(View);
1432 }; 1431 };
1433 1432
1434 } // namespace views 1433 } // namespace views
1435 1434
1436 #endif // UI_VIEWS_VIEW_H_ 1435 #endif // UI_VIEWS_VIEW_H_
OLDNEW
« no previous file with comments | « ui/views/focus/focus_search.cc ('k') | ui/views/view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698