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

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

Issue 2380303004: Move MdFocusRing to be a property of FocusManager. (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « ui/views/focus/focus_manager.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after
1143 FocusBehavior focus_behavior() const { return focus_behavior_; } 1143 FocusBehavior focus_behavior() const { return focus_behavior_; }
1144 1144
1145 // Override to be notified when focus has changed either to or from this View. 1145 // Override to be notified when focus has changed either to or from this View.
1146 virtual void OnFocus(); 1146 virtual void OnFocus();
1147 virtual void OnBlur(); 1147 virtual void OnBlur();
1148 1148
1149 // Handle view focus/blur events for this view. 1149 // Handle view focus/blur events for this view.
1150 void Focus(); 1150 void Focus();
1151 void Blur(); 1151 void Blur();
1152 1152
1153 // See documentation on variable.
1154 bool should_use_md_focus_ring() { return should_use_md_focus_ring_; }
1155 void set_should_use_md_focus_ring(bool use) {
1156 should_use_md_focus_ring_ = use;
1157 }
1158
1153 // System events ------------------------------------------------------------- 1159 // System events -------------------------------------------------------------
1154 1160
1155 // Called when the UI theme (not the NativeTheme) has changed, overriding 1161 // Called when the UI theme (not the NativeTheme) has changed, overriding
1156 // allows individual Views to do special cleanup and processing (such as 1162 // allows individual Views to do special cleanup and processing (such as
1157 // dropping resource caches). To dispatch a theme changed notification, call 1163 // dropping resource caches). To dispatch a theme changed notification, call
1158 // Widget::ThemeChanged(). 1164 // Widget::ThemeChanged().
1159 virtual void OnThemeChanged() {} 1165 virtual void OnThemeChanged() {}
1160 1166
1161 // Called when the locale has changed, overriding allows individual Views to 1167 // Called when the locale has changed, overriding allows individual Views to
1162 // update locale-dependent strings. 1168 // update locale-dependent strings.
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
1539 1545
1540 // Next view to be focused when the Tab key is pressed. 1546 // Next view to be focused when the Tab key is pressed.
1541 View* next_focusable_view_; 1547 View* next_focusable_view_;
1542 1548
1543 // Next view to be focused when the Shift-Tab key combination is pressed. 1549 // Next view to be focused when the Shift-Tab key combination is pressed.
1544 View* previous_focusable_view_; 1550 View* previous_focusable_view_;
1545 1551
1546 // The focus behavior of the view in regular and accessibility mode. 1552 // The focus behavior of the view in regular and accessibility mode.
1547 FocusBehavior focus_behavior_; 1553 FocusBehavior focus_behavior_;
1548 1554
1555 // True if this view wants to display focus via a Harmony/MD style focus ring.
1556 bool should_use_md_focus_ring_;
1557
1549 // Context menus ------------------------------------------------------------- 1558 // Context menus -------------------------------------------------------------
1550 1559
1551 // The menu controller. 1560 // The menu controller.
1552 ContextMenuController* context_menu_controller_; 1561 ContextMenuController* context_menu_controller_;
1553 1562
1554 // Drag and drop ------------------------------------------------------------- 1563 // Drag and drop -------------------------------------------------------------
1555 1564
1556 DragController* drag_controller_; 1565 DragController* drag_controller_;
1557 1566
1558 // Input -------------------------------------------------------------------- 1567 // Input --------------------------------------------------------------------
1559 1568
1560 std::unique_ptr<ViewTargeter> targeter_; 1569 std::unique_ptr<ViewTargeter> targeter_;
1561 1570
1562 // Accessibility ------------------------------------------------------------- 1571 // Accessibility -------------------------------------------------------------
1563 1572
1564 // Belongs to this view, but it's reference-counted on some platforms 1573 // Belongs to this view, but it's reference-counted on some platforms
1565 // so we can't use a scoped_ptr. It's dereferenced in the destructor. 1574 // so we can't use a scoped_ptr. It's dereferenced in the destructor.
1566 NativeViewAccessibility* native_view_accessibility_; 1575 NativeViewAccessibility* native_view_accessibility_;
1567 1576
1568 DISALLOW_COPY_AND_ASSIGN(View); 1577 DISALLOW_COPY_AND_ASSIGN(View);
1569 }; 1578 };
1570 1579
1571 } // namespace views 1580 } // namespace views
1572 1581
1573 #endif // UI_VIEWS_VIEW_H_ 1582 #endif // UI_VIEWS_VIEW_H_
OLDNEW
« no previous file with comments | « ui/views/focus/focus_manager.cc ('k') | ui/views/view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698