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

Side by Side Diff: ui/views/widget/root_view.cc

Issue 2507403002: Remove Widget::OnRootViewLayout(). (Closed)
Patch Set: Created 4 years, 1 month 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/widget/root_view.h ('k') | ui/views/widget/widget.h » ('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 #include "ui/views/widget/root_view.h" 5 #include "ui/views/widget/root_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 } 310 }
311 311
312 Widget* RootView::GetWidget() { 312 Widget* RootView::GetWidget() {
313 return const_cast<Widget*>(const_cast<const RootView*>(this)->GetWidget()); 313 return const_cast<Widget*>(const_cast<const RootView*>(this)->GetWidget());
314 } 314 }
315 315
316 bool RootView::IsDrawn() const { 316 bool RootView::IsDrawn() const {
317 return visible(); 317 return visible();
318 } 318 }
319 319
320 void RootView::Layout() {
321 View::Layout();
322 widget_->OnRootViewLayout();
323 }
324
325 const char* RootView::GetClassName() const { 320 const char* RootView::GetClassName() const {
326 return kViewClassName; 321 return kViewClassName;
327 } 322 }
328 323
329 void RootView::SchedulePaintInRect(const gfx::Rect& rect) { 324 void RootView::SchedulePaintInRect(const gfx::Rect& rect) {
330 if (layer()) { 325 if (layer()) {
331 layer()->SchedulePaint(rect); 326 layer()->SchedulePaint(rect);
332 } else { 327 } else {
333 gfx::Rect xrect = ConvertRectToParent(rect); 328 gfx::Rect xrect = ConvertRectToParent(rect);
334 gfx::Rect invalid_rect = gfx::IntersectRects(GetLocalBounds(), xrect); 329 gfx::Rect invalid_rect = gfx::IntersectRects(GetLocalBounds(), xrect);
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 752
758 #ifndef NDEBUG 753 #ifndef NDEBUG
759 DCHECK(!event_dispatch_target_ || Contains(event_dispatch_target_)); 754 DCHECK(!event_dispatch_target_ || Contains(event_dispatch_target_));
760 #endif 755 #endif
761 756
762 return details; 757 return details;
763 } 758 }
764 759
765 } // namespace internal 760 } // namespace internal
766 } // namespace views 761 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/root_view.h ('k') | ui/views/widget/widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698