OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |