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 {
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 {
53 int PopupNonClientFrameView::GetThemeBackgroundXInset() const {
57 void PopupNonClientFrameView::UpdateThrobber(bool running
) {