| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef UI_VIEWS_WINDOW_NATIVE_FRAME_VIEW_H_ | 5 #ifndef UI_VIEWS_WINDOW_NATIVE_FRAME_VIEW_H_ |
| 6 #define UI_VIEWS_WINDOW_NATIVE_FRAME_VIEW_H_ | 6 #define UI_VIEWS_WINDOW_NATIVE_FRAME_VIEW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "ui/views/window/non_client_view.h" | 9 #include "ui/views/window/non_client_view.h" |
| 10 | 10 |
| 11 namespace views { | 11 namespace views { |
| 12 | 12 |
| 13 class Widget; | 13 class Widget; |
| 14 | 14 |
| 15 class VIEWS_EXPORT NativeFrameView : public NonClientFrameView { | 15 class VIEWS_EXPORT NativeFrameView : public NonClientFrameView { |
| 16 public: | 16 public: |
| 17 explicit NativeFrameView(Widget* frame); | 17 explicit NativeFrameView(Widget* frame); |
| 18 virtual ~NativeFrameView(); | 18 virtual ~NativeFrameView(); |
| 19 | 19 |
| 20 // NonClientFrameView overrides: | 20 // NonClientFrameView overrides: |
| 21 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE; | 21 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE; |
| 22 virtual gfx::Rect GetWindowBoundsForClientBounds( | 22 virtual gfx::Rect GetWindowBoundsForClientBounds( |
| 23 const gfx::Rect& client_bounds) const OVERRIDE; | 23 const gfx::Rect& client_bounds) const OVERRIDE; |
| 24 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE; | 24 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE; |
| 25 virtual void GetWindowMask(const gfx::Size& size, | 25 virtual void GetWindowMask(const gfx::Size& size, |
| 26 gfx::Path* window_mask) OVERRIDE; | 26 gfx::Path* window_mask) OVERRIDE; |
| 27 virtual void EnableClose(bool enable) OVERRIDE; |
| 27 virtual void ResetWindowControls() OVERRIDE; | 28 virtual void ResetWindowControls() OVERRIDE; |
| 28 virtual void UpdateWindowIcon() OVERRIDE; | 29 virtual void UpdateWindowIcon() OVERRIDE; |
| 29 | 30 |
| 30 // View overrides: | 31 // View overrides: |
| 31 | 32 |
| 32 // Returns the client size. On Windows, this is the expected behavior for | 33 // Returns the client size. On Windows, this is the expected behavior for |
| 33 // native frames (see |NativeWidgetWin::WidgetSizeIsClientSize()|), while | 34 // native frames (see |NativeWidgetWin::WidgetSizeIsClientSize()|), while |
| 34 // other platforms currently always return client bounds from | 35 // other platforms currently always return client bounds from |
| 35 // |GetWindowBoundsForClientBounds()|. | 36 // |GetWindowBoundsForClientBounds()|. |
| 36 virtual gfx::Size GetPreferredSize() OVERRIDE; | 37 virtual gfx::Size GetPreferredSize() OVERRIDE; |
| 37 | 38 |
| 38 private: | 39 private: |
| 39 // Our containing frame. | 40 // Our containing frame. |
| 40 Widget* frame_; | 41 Widget* frame_; |
| 41 | 42 |
| 42 DISALLOW_COPY_AND_ASSIGN(NativeFrameView); | 43 DISALLOW_COPY_AND_ASSIGN(NativeFrameView); |
| 43 }; | 44 }; |
| 44 | 45 |
| 45 } // namespace views | 46 } // namespace views |
| 46 | 47 |
| 47 #endif // UI_VIEWS_WINDOW_NATIVE_FRAME_VIEW_H_ | 48 #endif // UI_VIEWS_WINDOW_NATIVE_FRAME_VIEW_H_ |
| OLD | NEW |