[Metrics] Make MetricsStateManager take a callback param to check if UMA is enabled.
[chromium-blink-merge.git] / chrome / browser / ui / views / frame / top_container_view.cc
blobe36d6084b0012172d602c20fb2edda4e060454eb
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
3 // found in the LICENSE file.
5 #include "chrome/browser/ui/views/frame/top_container_view.h"
7 #include "chrome/browser/ui/views/frame/browser_frame.h"
8 #include "chrome/browser/ui/views/frame/browser_view.h"
9 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h"
11 TopContainerView::TopContainerView(BrowserView* browser_view)
12 : browser_view_(browser_view) {
15 TopContainerView::~TopContainerView() {
18 const char* TopContainerView::GetClassName() const {
19 return "TopContainerView";
22 void TopContainerView::OnPaintBackground(gfx::Canvas* canvas) {
23 if (browser_view_->immersive_mode_controller()->IsRevealed()) {
24 // Top-views depend on parts of the frame (themes, window title,
25 // 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 views::View* frame = browser_view_->frame()->GetFrameView();
28 frame->Paint(canvas, views::CullSet());