Home | History | Annotate | Download | only in frame
      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 
     15 gfx::Rect PopupNonClientFrameView::GetBoundsForClientView() const {
     16   return gfx::Rect(0, 0, width(), height());
     17 }
     18 
     19 bool PopupNonClientFrameView::AlwaysUseCustomFrame() const {
     20   return false;
     21 }
     22 
     23 bool PopupNonClientFrameView::AlwaysUseNativeFrame() const {
     24   return true;
     25 }
     26 
     27 gfx::Rect PopupNonClientFrameView::GetWindowBoundsForClientBounds(
     28     const gfx::Rect& client_bounds) const {
     29   return client_bounds;
     30 }
     31 
     32 int PopupNonClientFrameView::NonClientHitTest(const gfx::Point& point) {
     33   return bounds().Contains(point) ? HTCLIENT : HTNOWHERE;
     34 }
     35 
     36 void PopupNonClientFrameView::GetWindowMask(const gfx::Size& size,
     37                                                     gfx::Path* window_mask) {
     38 }
     39 
     40 void PopupNonClientFrameView::EnableClose(bool enable) {
     41 }
     42 
     43 void PopupNonClientFrameView::ResetWindowControls() {
     44 }
     45 
     46 void PopupNonClientFrameView::UpdateWindowIcon() {
     47 }
     48 
     49 gfx::Rect PopupNonClientFrameView::GetBoundsForTabStrip(
     50     views::View* tabstrip) const {
     51   return gfx::Rect(0, 0, width(), tabstrip->GetPreferredSize().height());
     52 }
     53 
     54 int PopupNonClientFrameView::GetHorizontalTabStripVerticalOffset(
     55     bool restored) const {
     56   return 0;
     57 }
     58 
     59 void PopupNonClientFrameView::UpdateThrobber(bool running) {
     60 }
     61