popup_non_client_frame_view.cc revision 4a5e2dc747d50c653511c68ccb2cfbfb740bd5a7
1// Copyright (c) 2010 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.
4
5#include "chrome/browser/views/frame/popup_non_client_frame_view.h"
6
7#include "chrome/browser/views/tabs/base_tab_strip.h"
8#include "gfx/point.h"
9#include "gfx/rect.h"
10#include "gfx/size.h"
11
12#if defined(OS_LINUX)
13#include "views/window/hit_test.h"
14#endif
15
16gfx::Rect PopupNonClientFrameView::GetBoundsForClientView() const {
17  return gfx::Rect(0, 0, width(), height());
18}
19
20bool PopupNonClientFrameView::AlwaysUseCustomFrame() const {
21  return false;
22}
23
24bool PopupNonClientFrameView::AlwaysUseNativeFrame() const {
25  return true;
26}
27
28gfx::Rect PopupNonClientFrameView::GetWindowBoundsForClientBounds(
29    const gfx::Rect& client_bounds) const {
30  return client_bounds;
31}
32
33int PopupNonClientFrameView::NonClientHitTest(const gfx::Point& point) {
34  return bounds().Contains(point) ? HTCLIENT : HTNOWHERE;
35}
36
37void PopupNonClientFrameView::GetWindowMask(const gfx::Size& size,
38                                                    gfx::Path* window_mask) {
39}
40
41void PopupNonClientFrameView::EnableClose(bool enable) {
42}
43
44void PopupNonClientFrameView::ResetWindowControls() {
45}
46
47gfx::Rect PopupNonClientFrameView::GetBoundsForTabStrip(
48    BaseTabStrip* tabstrip) const {
49  return gfx::Rect(0, 0, width(), tabstrip->GetPreferredHeight());
50}
51
52int PopupNonClientFrameView::GetHorizontalTabStripVerticalOffset(
53    bool restored) const {
54  return 0;
55}
56
57void PopupNonClientFrameView::UpdateThrobber(bool running) {
58}
59