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