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. 4 5 #include "chrome/browser/ui/views/frame/popup_non_client_frame_view.h" 6 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" 12 13 PopupNonClientFrameView::PopupNonClientFrameView(BrowserFrame* frame) 14 : BrowserNonClientFrameView(frame, NULL) { 15 frame->set_frame_type(views::Widget::FRAME_TYPE_FORCE_NATIVE); 16 } 17 18 gfx::Rect PopupNonClientFrameView::GetBoundsForClientView() const { 19 return gfx::Rect(0, 0, width(), height()); 20 } 21 22 gfx::Rect PopupNonClientFrameView::GetWindowBoundsForClientBounds( 23 const gfx::Rect& client_bounds) const { 24 return client_bounds; 25 } 26 27 int PopupNonClientFrameView::NonClientHitTest(const gfx::Point& point) { 28 return bounds().Contains(point) ? HTCLIENT : HTNOWHERE; 29 } 30 31 void PopupNonClientFrameView::GetWindowMask(const gfx::Size& size, 32 gfx::Path* window_mask) { 33 } 34 35 void PopupNonClientFrameView::ResetWindowControls() { 36 } 37 38 void PopupNonClientFrameView::UpdateWindowIcon() { 39 } 40 41 void PopupNonClientFrameView::UpdateWindowTitle() { 42 } 43 44 gfx::Rect PopupNonClientFrameView::GetBoundsForTabStrip( 45 views::View* tabstrip) const { 46 return gfx::Rect(0, 0, width(), tabstrip->GetPreferredSize().height()); 47 } 48 49 BrowserNonClientFrameView::TabStripInsets 50 PopupNonClientFrameView::GetTabStripInsets(bool restored) const { 51 return TabStripInsets(); 52 } 53 54 int PopupNonClientFrameView::GetThemeBackgroundXInset() const { 55 return 0; 56 } 57 58 void PopupNonClientFrameView::UpdateThrobber(bool running) { 59 } 60