| OLD | NEW |
| (Empty) | |
| 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/constrained_window_frame_view.h" |
| 6 |
| 7 #include "chrome/browser/ui/views/constrained_window_views.h" |
| 8 #include "ui/base/hit_test.h" |
| 9 #include "ui/gfx/rect.h" |
| 10 #include "ui/views/widget/widget.h" |
| 11 |
| 12 ConstrainedWindowFrameView::ConstrainedWindowFrameView( |
| 13 ConstrainedWindowViews* container) { |
| 14 // Draw a custom frame, ie NO frame. |
| 15 container->set_frame_type(views::Widget::FRAME_TYPE_FORCE_CUSTOM); |
| 16 } |
| 17 |
| 18 gfx::Rect ConstrainedWindowFrameView::GetBoundsForClientView() const { |
| 19 return bounds(); |
| 20 } |
| 21 |
| 22 gfx::Rect ConstrainedWindowFrameView::GetWindowBoundsForClientBounds( |
| 23 const gfx::Rect& client_bounds) const { |
| 24 return client_bounds; |
| 25 } |
| 26 |
| 27 int ConstrainedWindowFrameView::NonClientHitTest(const gfx::Point& point) { |
| 28 if (!bounds().Contains(point)) |
| 29 return HTNOWHERE; |
| 30 return HTCLIENT; |
| 31 } |
| OLD | NEW |