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

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

Issue 1461673002: Moved parent_->SchedulePaint() to Views::SetFillsBoundsOpaquely() and Views::SchedulePaint(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed doc comment in View::CreateLayer(). Created 4 years, 11 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 | « chrome/browser/ui/views/toolbar/toolbar_button.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 <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
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;
1223 friend class Widget; 1224 friend class Widget;
1224 1225
1225 // Painting ----------------------------------------------------------------- 1226 // Painting -----------------------------------------------------------------
1226 1227
1227 enum SchedulePaintType { 1228 enum SchedulePaintType {
1228 // Indicates the size is the same (only the origin changed). 1229 // Indicates the size is the same (only the origin changed).
1229 SCHEDULE_PAINT_SIZE_SAME, 1230 SCHEDULE_PAINT_SIZE_SAME,
1230 1231
1231 // Indicates the size changed (and possibly the origin). 1232 // Indicates the size changed (and possibly the origin).
1232 SCHEDULE_PAINT_SIZE_CHANGED 1233 SCHEDULE_PAINT_SIZE_CHANGED
1233 }; 1234 };
1234 1235
1235 // Invoked before and after the bounds change to schedule painting the old and 1236 // Invoked before and after the bounds change to schedule painting the old and
1236 // new bounds. 1237 // new bounds.
1237 void SchedulePaintBoundsChanged(SchedulePaintType type); 1238 void SchedulePaintBoundsChanged(SchedulePaintType type);
1238 1239
1240 // Schedules a paint on the parent View if it exists.
1241 void SchedulePaintOnParent();
1242
1239 // Tree operations ----------------------------------------------------------- 1243 // Tree operations -----------------------------------------------------------
1240 1244
1241 // Removes |view| from the hierarchy tree. If |update_focus_cycle| is true, 1245 // Removes |view| from the hierarchy tree. If |update_focus_cycle| is true,
1242 // the next and previous focusable views of views pointing to this view are 1246 // the next and previous focusable views of views pointing to this view are
1243 // updated. If |update_tool_tip| is true, the tooltip is updated. If 1247 // updated. If |update_tool_tip| is true, the tooltip is updated. If
1244 // |delete_removed_view| is true, the view is also deleted (if it is parent 1248 // |delete_removed_view| is true, the view is also deleted (if it is parent
1245 // owned). If |new_parent| is not NULL, the remove is the result of 1249 // owned). If |new_parent| is not NULL, the remove is the result of
1246 // AddChildView() to a new parent. For this case, |new_parent| is the View 1250 // AddChildView() to a new parent. For this case, |new_parent| is the View
1247 // that |view| is going to be added to after the remove completes. 1251 // that |view| is going to be added to after the remove completes.
1248 void DoRemoveChildView(View* view, 1252 void DoRemoveChildView(View* view,
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
1567 // Belongs to this view, but it's reference-counted on some platforms 1571 // Belongs to this view, but it's reference-counted on some platforms
1568 // so we can't use a scoped_ptr. It's dereferenced in the destructor. 1572 // so we can't use a scoped_ptr. It's dereferenced in the destructor.
1569 NativeViewAccessibility* native_view_accessibility_; 1573 NativeViewAccessibility* native_view_accessibility_;
1570 1574
1571 DISALLOW_COPY_AND_ASSIGN(View); 1575 DISALLOW_COPY_AND_ASSIGN(View);
1572 }; 1576 };
1573 1577
1574 } // namespace views 1578 } // namespace views
1575 1579
1576 #endif // UI_VIEWS_VIEW_H_ 1580 #endif // UI_VIEWS_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/toolbar/toolbar_button.cc ('k') | ui/views/view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698