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