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

Side by Side Diff: chrome/browser/ui/views/frame/top_container_view.cc

Issue 1036403002: views: Move TopContainerView paint recursion to PaintChildren. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: topcontainerview: . Created 5 years, 9 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/frame/top_container_view.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/ui/views/frame/top_container_view.h" 5 #include "chrome/browser/ui/views/frame/top_container_view.h"
6 6
7 #include "chrome/browser/ui/views/frame/browser_frame.h" 7 #include "chrome/browser/ui/views/frame/browser_frame.h"
8 #include "chrome/browser/ui/views/frame/browser_view.h" 8 #include "chrome/browser/ui/views/frame/browser_view.h"
9 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h" 9 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h"
10 10
11 TopContainerView::TopContainerView(BrowserView* browser_view) 11 TopContainerView::TopContainerView(BrowserView* browser_view)
12 : browser_view_(browser_view) { 12 : browser_view_(browser_view) {
13 } 13 }
14 14
15 TopContainerView::~TopContainerView() { 15 TopContainerView::~TopContainerView() {
16 } 16 }
17 17
18 const char* TopContainerView::GetClassName() const { 18 const char* TopContainerView::GetClassName() const {
19 return "TopContainerView"; 19 return "TopContainerView";
20 } 20 }
21 21
22 void TopContainerView::OnPaintBackground(gfx::Canvas* canvas) { 22 void TopContainerView::PaintChildren(gfx::Canvas* canvas,
23 const views::CullSet& cull_set) {
23 if (browser_view_->immersive_mode_controller()->IsRevealed()) { 24 if (browser_view_->immersive_mode_controller()->IsRevealed()) {
24 // Top-views depend on parts of the frame (themes, window title, 25 // Top-views depend on parts of the frame (themes, window title,
25 // window controls) being painted underneath them. Clip rect has already 26 // window controls) being painted underneath them. Clip rect has already
26 // been set to the bounds of this view, so just paint the frame. 27 // been set to the bounds of this view, so just paint the frame.
27 views::View* frame = browser_view_->frame()->GetFrameView(); 28 views::View* frame = browser_view_->frame()->GetFrameView();
29 // Use an empty CullSet as we're painting something outside of the normal
30 // parent-child relationship that the CullSet would understand.
28 frame->Paint(canvas, views::CullSet()); 31 frame->Paint(canvas, views::CullSet());
29 } 32 }
33 View::PaintChildren(canvas, cull_set);
30 } 34 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/top_container_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698