OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2009 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/views/native_frame_view.h" |
| 6 |
| 7 #include "chrome/views/window.h" |
| 8 |
| 9 namespace views { |
| 10 |
| 11 //////////////////////////////////////////////////////////////////////////////// |
| 12 // NativeFrameView, public: |
| 13 |
| 14 NativeFrameView::NativeFrameView(Window* frame) |
| 15 : NonClientFrameView(), |
| 16 frame_(frame) { |
| 17 } |
| 18 |
| 19 NativeFrameView::~NativeFrameView() { |
| 20 } |
| 21 |
| 22 //////////////////////////////////////////////////////////////////////////////// |
| 23 // NativeFrameView, NonClientFrameView overrides: |
| 24 |
| 25 gfx::Rect NativeFrameView::GetBoundsForClientView() const { |
| 26 return gfx::Rect(0, 0, width(), height()); |
| 27 } |
| 28 |
| 29 gfx::Rect NativeFrameView::GetWindowBoundsForClientBounds( |
| 30 const gfx::Rect& client_bounds) const { |
| 31 RECT rect = client_bounds.ToRECT(); |
| 32 AdjustWindowRectEx(&rect, frame_->window_style(), FALSE, |
| 33 frame_->window_ex_style()); |
| 34 return gfx::Rect(rect); |
| 35 } |
| 36 |
| 37 gfx::Point NativeFrameView::GetSystemMenuPoint() const { |
| 38 POINT temp = {0, -kFrameShadowThickness }; |
| 39 MapWindowPoints(frame_->GetHWND(), HWND_DESKTOP, &temp, 1); |
| 40 return gfx::Point(temp); |
| 41 } |
| 42 |
| 43 int NativeFrameView::NonClientHitTest(const gfx::Point& point) { |
| 44 return HTNOWHERE; |
| 45 } |
| 46 |
| 47 void NativeFrameView::GetWindowMask(const gfx::Size& size, |
| 48 gfx::Path* window_mask) { |
| 49 // Nothing to do, we use the default window mask. |
| 50 } |
| 51 |
| 52 void NativeFrameView::EnableClose(bool enable) { |
| 53 // Nothing to do, handled automatically by Window. |
| 54 } |
| 55 |
| 56 void NativeFrameView::ResetWindowControls() { |
| 57 // Nothing to do. |
| 58 } |
| 59 |
| 60 } // namespace views |
| 61 |
OLD | NEW |