| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "views/window/native_frame_view.h" | 5 #include "views/window/native_frame_view.h" |
| 6 | 6 |
| 7 #include "views/window/window_win.h" | 7 #include "views/window/window_win.h" |
| 8 | 8 |
| 9 namespace views { | 9 namespace views { |
| 10 | 10 |
| 11 //////////////////////////////////////////////////////////////////////////////// | 11 //////////////////////////////////////////////////////////////////////////////// |
| (...skipping 15 matching lines...) Expand all Loading... |
| 27 } | 27 } |
| 28 | 28 |
| 29 gfx::Rect NativeFrameView::GetWindowBoundsForClientBounds( | 29 gfx::Rect NativeFrameView::GetWindowBoundsForClientBounds( |
| 30 const gfx::Rect& client_bounds) const { | 30 const gfx::Rect& client_bounds) const { |
| 31 RECT rect = client_bounds.ToRECT(); | 31 RECT rect = client_bounds.ToRECT(); |
| 32 AdjustWindowRectEx(&rect, frame_->window_style(), FALSE, | 32 AdjustWindowRectEx(&rect, frame_->window_style(), FALSE, |
| 33 frame_->window_ex_style()); | 33 frame_->window_ex_style()); |
| 34 return gfx::Rect(rect); | 34 return gfx::Rect(rect); |
| 35 } | 35 } |
| 36 | 36 |
| 37 gfx::Point NativeFrameView::GetSystemMenuPoint() const { | |
| 38 POINT temp = {0, -kFrameShadowThickness }; | |
| 39 MapWindowPoints(frame_->GetNativeView(), HWND_DESKTOP, &temp, 1); | |
| 40 return gfx::Point(temp); | |
| 41 } | |
| 42 | |
| 43 int NativeFrameView::NonClientHitTest(const gfx::Point& point) { | 37 int NativeFrameView::NonClientHitTest(const gfx::Point& point) { |
| 44 return HTNOWHERE; | 38 return HTNOWHERE; |
| 45 } | 39 } |
| 46 | 40 |
| 47 void NativeFrameView::GetWindowMask(const gfx::Size& size, | 41 void NativeFrameView::GetWindowMask(const gfx::Size& size, |
| 48 gfx::Path* window_mask) { | 42 gfx::Path* window_mask) { |
| 49 // Nothing to do, we use the default window mask. | 43 // Nothing to do, we use the default window mask. |
| 50 } | 44 } |
| 51 | 45 |
| 52 void NativeFrameView::EnableClose(bool enable) { | 46 void NativeFrameView::EnableClose(bool enable) { |
| 53 // Nothing to do, handled automatically by Window. | 47 // Nothing to do, handled automatically by Window. |
| 54 } | 48 } |
| 55 | 49 |
| 56 void NativeFrameView::ResetWindowControls() { | 50 void NativeFrameView::ResetWindowControls() { |
| 57 // Nothing to do. | 51 // Nothing to do. |
| 58 } | 52 } |
| 59 | 53 |
| 60 } // namespace views | 54 } // namespace views |
| OLD | NEW |