[Metrics] Make MetricsStateManager take a callback param to check if UMA is enabled.
[chromium-blink-merge.git] / chrome / browser / ui / views / frame / popup_non_client_frame_view.cc
blob5243545cd4fc71310c80684e60b3f204abfe27d1
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
3 // found in the LICENSE file.
5 #include "chrome/browser/ui/views/frame/popup_non_client_frame_view.h"
7 #include "chrome/browser/ui/views/frame/browser_frame.h"
8 #include "ui/base/hit_test.h"
9 #include "ui/gfx/point.h"
10 #include "ui/gfx/rect.h"
11 #include "ui/gfx/size.h"
13 PopupNonClientFrameView::PopupNonClientFrameView(BrowserFrame* frame)
14 : BrowserNonClientFrameView(frame, NULL) {
15 frame->set_frame_type(views::Widget::FRAME_TYPE_FORCE_NATIVE);
18 gfx::Rect PopupNonClientFrameView::GetBoundsForClientView() const {
19 return gfx::Rect(0, 0, width(), height());
22 gfx::Rect PopupNonClientFrameView::GetWindowBoundsForClientBounds(
23 const gfx::Rect& client_bounds) const {
24 return client_bounds;
27 int PopupNonClientFrameView::NonClientHitTest(const gfx::Point& point) {
28 return bounds().Contains(point) ? HTCLIENT : HTNOWHERE;
31 void PopupNonClientFrameView::GetWindowMask(const gfx::Size& size,
32 gfx::Path* window_mask) {
35 void PopupNonClientFrameView::ResetWindowControls() {
38 void PopupNonClientFrameView::UpdateWindowIcon() {
41 void PopupNonClientFrameView::UpdateWindowTitle() {
44 gfx::Rect PopupNonClientFrameView::GetBoundsForTabStrip(
45 views::View* tabstrip) const {
46 return gfx::Rect(0, 0, width(), tabstrip->GetPreferredSize().height());
49 int PopupNonClientFrameView::GetTopInset() const {
50 return 0;
53 int PopupNonClientFrameView::GetThemeBackgroundXInset() const {
54 return 0;
57 void PopupNonClientFrameView::UpdateThrobber(bool running) {