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

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

Issue 1924893003: Views: Replace View::focusable() with View::focus_behavior(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@SetFocusBehavior
Patch Set: Created 4 years, 7 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/controls/label.cc ('k') | ui/views/view_unittest.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 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after
1137 // with an associated view. Widget::ReorderNativeViews() may reorder layers 1137 // with an associated view. Widget::ReorderNativeViews() may reorder layers
1138 // below layers owned by a view. 1138 // below layers owned by a view.
1139 virtual void ReorderChildLayers(ui::Layer* parent_layer); 1139 virtual void ReorderChildLayers(ui::Layer* parent_layer);
1140 1140
1141 // Input --------------------------------------------------------------------- 1141 // Input ---------------------------------------------------------------------
1142 1142
1143 virtual DragInfo* GetDragInfo(); 1143 virtual DragInfo* GetDragInfo();
1144 1144
1145 // Focus --------------------------------------------------------------------- 1145 // Focus ---------------------------------------------------------------------
1146 1146
1147 // Returns true if ALWAYS is the last set focus behavior. Use IsFocusable() to 1147 // Returns last set focus behavior.
1148 // determine if a view can take focus right now. 1148 FocusBehavior focus_behavior() const { return focus_behavior_; }
1149 bool focusable() const { return focus_behavior_ == FocusBehavior::ALWAYS; }
1150 1149
1151 // Override to be notified when focus has changed either to or from this View. 1150 // Override to be notified when focus has changed either to or from this View.
1152 virtual void OnFocus(); 1151 virtual void OnFocus();
1153 virtual void OnBlur(); 1152 virtual void OnBlur();
1154 1153
1155 // Handle view focus/blur events for this view. 1154 // Handle view focus/blur events for this view.
1156 void Focus(); 1155 void Focus();
1157 void Blur(); 1156 void Blur();
1158 1157
1159 // System events ------------------------------------------------------------- 1158 // System events -------------------------------------------------------------
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
1568 // Belongs to this view, but it's reference-counted on some platforms 1567 // Belongs to this view, but it's reference-counted on some platforms
1569 // so we can't use a scoped_ptr. It's dereferenced in the destructor. 1568 // so we can't use a scoped_ptr. It's dereferenced in the destructor.
1570 NativeViewAccessibility* native_view_accessibility_; 1569 NativeViewAccessibility* native_view_accessibility_;
1571 1570
1572 DISALLOW_COPY_AND_ASSIGN(View); 1571 DISALLOW_COPY_AND_ASSIGN(View);
1573 }; 1572 };
1574 1573
1575 } // namespace views 1574 } // namespace views
1576 1575
1577 #endif // UI_VIEWS_VIEW_H_ 1576 #endif // UI_VIEWS_VIEW_H_
OLDNEW
« no previous file with comments | « ui/views/controls/label.cc ('k') | ui/views/view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698