| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/views/frame/popup_non_client_frame_view.h" | 5 #include "chrome/browser/ui/views/frame/popup_non_client_frame_view.h" |
| 6 | 6 |
| 7 #include "chrome/browser/ui/views/frame/browser_frame.h" | 7 #include "chrome/browser/ui/views/frame/browser_frame.h" |
| 8 #include "ui/base/hit_test.h" | 8 #include "ui/base/hit_test.h" |
| 9 #include "ui/gfx/point.h" | 9 #include "ui/gfx/point.h" |
| 10 #include "ui/gfx/rect.h" | 10 #include "ui/gfx/rect.h" |
| 11 #include "ui/gfx/size.h" | 11 #include "ui/gfx/size.h" |
| 12 | 12 |
| 13 PopupNonClientFrameView::PopupNonClientFrameView(BrowserFrame* frame) | 13 PopupNonClientFrameView::PopupNonClientFrameView(BrowserFrame* frame) |
| 14 : BrowserNonClientFrameView(frame, NULL) { | 14 : BrowserNonClientFrameView(frame, NULL) { |
| 15 frame->set_frame_type(views::Widget::FRAME_TYPE_FORCE_NATIVE); | 15 frame->set_frame_type(views::Widget::FRAME_TYPE_FORCE_NATIVE); |
| 16 } | 16 } |
| 17 | 17 |
| 18 gfx::Rect PopupNonClientFrameView::GetBoundsForClientView() const { | 18 gfx::Rect PopupNonClientFrameView::GetBoundsForClientView() const { |
| 19 return gfx::Rect(0, 0, width(), height()); | 19 return gfx::Rect(0, 0, width(), height()); |
| 20 } | 20 } |
| 21 | 21 |
| 22 gfx::Rect PopupNonClientFrameView::GetWindowBoundsForClientBounds( | 22 gfx::Rect PopupNonClientFrameView::GetWindowBoundsForClientBounds( |
| 23 const gfx::Rect& client_bounds) const { | 23 const gfx::Rect& client_bounds) const { |
| 24 return client_bounds; | 24 return client_bounds; |
| 25 } | 25 } |
| 26 | 26 |
| 27 int PopupNonClientFrameView::NonClientHitTest(const gfx::Point& point) { | 27 int PopupNonClientFrameView::NonClientHitTest(const gfx::Point& point) const { |
| 28 return bounds().Contains(point) ? HTCLIENT : HTNOWHERE; | 28 return bounds().Contains(point) ? HTCLIENT : HTNOWHERE; |
| 29 } | 29 } |
| 30 | 30 |
| 31 void PopupNonClientFrameView::GetWindowMask(const gfx::Size& size, | 31 void PopupNonClientFrameView::GetWindowMask(const gfx::Size& size, |
| 32 gfx::Path* window_mask) { | 32 gfx::Path* window_mask) { |
| 33 } | 33 } |
| 34 | 34 |
| 35 void PopupNonClientFrameView::ResetWindowControls() { | 35 void PopupNonClientFrameView::ResetWindowControls() { |
| 36 } | 36 } |
| 37 | 37 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 50 PopupNonClientFrameView::GetTabStripInsets(bool restored) const { | 50 PopupNonClientFrameView::GetTabStripInsets(bool restored) const { |
| 51 return TabStripInsets(); | 51 return TabStripInsets(); |
| 52 } | 52 } |
| 53 | 53 |
| 54 int PopupNonClientFrameView::GetThemeBackgroundXInset() const { | 54 int PopupNonClientFrameView::GetThemeBackgroundXInset() const { |
| 55 return 0; | 55 return 0; |
| 56 } | 56 } |
| 57 | 57 |
| 58 void PopupNonClientFrameView::UpdateThrobber(bool running) { | 58 void PopupNonClientFrameView::UpdateThrobber(bool running) { |
| 59 } | 59 } |
| OLD | NEW |