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 <algorithm> | 8 #include <algorithm> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 1202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1213 // decide which object should be used to obtain the children, but this | 1213 // decide which object should be used to obtain the children, but this |
1214 // function makes the decision explicit. | 1214 // function makes the decision explicit. |
1215 std::string DoPrintViewGraph(bool first, View* view_with_children); | 1215 std::string DoPrintViewGraph(bool first, View* view_with_children); |
1216 #endif | 1216 #endif |
1217 | 1217 |
1218 private: | 1218 private: |
1219 friend class internal::PreEventDispatchHandler; | 1219 friend class internal::PreEventDispatchHandler; |
1220 friend class internal::PostEventDispatchHandler; | 1220 friend class internal::PostEventDispatchHandler; |
1221 friend class internal::RootView; | 1221 friend class internal::RootView; |
1222 friend class FocusManager; | 1222 friend class FocusManager; |
1223 friend class ViewLayerTest; | |
1224 friend class Widget; | 1223 friend class Widget; |
1225 | 1224 |
1226 // Painting ----------------------------------------------------------------- | 1225 // Painting ----------------------------------------------------------------- |
1227 | 1226 |
1228 enum SchedulePaintType { | 1227 enum SchedulePaintType { |
1229 // Indicates the size is the same (only the origin changed). | 1228 // Indicates the size is the same (only the origin changed). |
1230 SCHEDULE_PAINT_SIZE_SAME, | 1229 SCHEDULE_PAINT_SIZE_SAME, |
1231 | 1230 |
1232 // Indicates the size changed (and possibly the origin). | 1231 // Indicates the size changed (and possibly the origin). |
1233 SCHEDULE_PAINT_SIZE_CHANGED | 1232 SCHEDULE_PAINT_SIZE_CHANGED |
1234 }; | 1233 }; |
1235 | 1234 |
1236 // Invoked before and after the bounds change to schedule painting the old and | 1235 // Invoked before and after the bounds change to schedule painting the old and |
1237 // new bounds. | 1236 // new bounds. |
1238 void SchedulePaintBoundsChanged(SchedulePaintType type); | 1237 void SchedulePaintBoundsChanged(SchedulePaintType type); |
1239 | 1238 |
1240 // Schedules a paint on the parent View if it exists. | |
1241 void SchedulePaintOnParent(); | |
1242 | |
1243 // Tree operations ----------------------------------------------------------- | 1239 // Tree operations ----------------------------------------------------------- |
1244 | 1240 |
1245 // Removes |view| from the hierarchy tree. If |update_focus_cycle| is true, | 1241 // Removes |view| from the hierarchy tree. If |update_focus_cycle| is true, |
1246 // the next and previous focusable views of views pointing to this view are | 1242 // the next and previous focusable views of views pointing to this view are |
1247 // updated. If |update_tool_tip| is true, the tooltip is updated. If | 1243 // updated. If |update_tool_tip| is true, the tooltip is updated. If |
1248 // |delete_removed_view| is true, the view is also deleted (if it is parent | 1244 // |delete_removed_view| is true, the view is also deleted (if it is parent |
1249 // owned). If |new_parent| is not NULL, the remove is the result of | 1245 // owned). If |new_parent| is not NULL, the remove is the result of |
1250 // AddChildView() to a new parent. For this case, |new_parent| is the View | 1246 // AddChildView() to a new parent. For this case, |new_parent| is the View |
1251 // that |view| is going to be added to after the remove completes. | 1247 // that |view| is going to be added to after the remove completes. |
1252 void DoRemoveChildView(View* view, | 1248 void DoRemoveChildView(View* view, |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1571 // 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 |
1572 // 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. |
1573 NativeViewAccessibility* native_view_accessibility_; | 1569 NativeViewAccessibility* native_view_accessibility_; |
1574 | 1570 |
1575 DISALLOW_COPY_AND_ASSIGN(View); | 1571 DISALLOW_COPY_AND_ASSIGN(View); |
1576 }; | 1572 }; |
1577 | 1573 |
1578 } // namespace views | 1574 } // namespace views |
1579 | 1575 |
1580 #endif // UI_VIEWS_VIEW_H_ | 1576 #endif // UI_VIEWS_VIEW_H_ |
OLD | NEW |