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 #ifndef UI_VIEWS_WINDOW_CUSTOM_FRAME_VIEW_H_ | 5 #ifndef UI_VIEWS_WINDOW_CUSTOM_FRAME_VIEW_H_ |
6 #define UI_VIEWS_WINDOW_CUSTOM_FRAME_VIEW_H_ | 6 #define UI_VIEWS_WINDOW_CUSTOM_FRAME_VIEW_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 //////////////////////////////////////////////////////////////////////////////// | 32 //////////////////////////////////////////////////////////////////////////////// |
33 class VIEWS_EXPORT CustomFrameView : public NonClientFrameView, | 33 class VIEWS_EXPORT CustomFrameView : public NonClientFrameView, |
34 public ButtonListener { | 34 public ButtonListener { |
35 public: | 35 public: |
36 CustomFrameView(); | 36 CustomFrameView(); |
37 virtual ~CustomFrameView(); | 37 virtual ~CustomFrameView(); |
38 | 38 |
39 void Init(Widget* frame); | 39 void Init(Widget* frame); |
40 | 40 |
41 // Overridden from NonClientFrameView: | 41 // Overridden from NonClientFrameView: |
42 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE; | 42 virtual gfx::Rect GetBoundsForClientView() const override; |
43 virtual gfx::Rect GetWindowBoundsForClientBounds( | 43 virtual gfx::Rect GetWindowBoundsForClientBounds( |
44 const gfx::Rect& client_bounds) const OVERRIDE; | 44 const gfx::Rect& client_bounds) const override; |
45 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE; | 45 virtual int NonClientHitTest(const gfx::Point& point) override; |
46 virtual void GetWindowMask(const gfx::Size& size, | 46 virtual void GetWindowMask(const gfx::Size& size, |
47 gfx::Path* window_mask) OVERRIDE; | 47 gfx::Path* window_mask) override; |
48 virtual void ResetWindowControls() OVERRIDE; | 48 virtual void ResetWindowControls() override; |
49 virtual void UpdateWindowIcon() OVERRIDE; | 49 virtual void UpdateWindowIcon() override; |
50 virtual void UpdateWindowTitle() OVERRIDE; | 50 virtual void UpdateWindowTitle() override; |
51 virtual void SizeConstraintsChanged() OVERRIDE; | 51 virtual void SizeConstraintsChanged() override; |
52 | 52 |
53 // Overridden from View: | 53 // Overridden from View: |
54 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 54 virtual void OnPaint(gfx::Canvas* canvas) override; |
55 virtual void Layout() OVERRIDE; | 55 virtual void Layout() override; |
56 virtual gfx::Size GetPreferredSize() const OVERRIDE; | 56 virtual gfx::Size GetPreferredSize() const override; |
57 virtual gfx::Size GetMinimumSize() const OVERRIDE; | 57 virtual gfx::Size GetMinimumSize() const override; |
58 virtual gfx::Size GetMaximumSize() const OVERRIDE; | 58 virtual gfx::Size GetMaximumSize() const override; |
59 | 59 |
60 // Overridden from ButtonListener: | 60 // Overridden from ButtonListener: |
61 virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE; | 61 virtual void ButtonPressed(Button* sender, const ui::Event& event) override; |
62 | 62 |
63 private: | 63 private: |
64 friend class CustomFrameViewTest; | 64 friend class CustomFrameViewTest; |
65 | 65 |
66 // Returns the thickness of the border that makes up the window frame edges. | 66 // Returns the thickness of the border that makes up the window frame edges. |
67 // This does not include any client edge. | 67 // This does not include any client edge. |
68 int FrameBorderThickness() const; | 68 int FrameBorderThickness() const; |
69 | 69 |
70 // Returns the thickness of the entire nonclient left, right, and bottom | 70 // Returns the thickness of the entire nonclient left, right, and bottom |
71 // borders, including both the window frame and any client edge. | 71 // borders, including both the window frame and any client edge. |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 // by the space used by the leading and trailing buttons. | 154 // by the space used by the leading and trailing buttons. |
155 int minimum_title_bar_x_; | 155 int minimum_title_bar_x_; |
156 int maximum_title_bar_x_; | 156 int maximum_title_bar_x_; |
157 | 157 |
158 DISALLOW_COPY_AND_ASSIGN(CustomFrameView); | 158 DISALLOW_COPY_AND_ASSIGN(CustomFrameView); |
159 }; | 159 }; |
160 | 160 |
161 } // namespace views | 161 } // namespace views |
162 | 162 |
163 #endif // UI_VIEWS_WINDOW_CUSTOM_FRAME_VIEW_H_ | 163 #endif // UI_VIEWS_WINDOW_CUSTOM_FRAME_VIEW_H_ |
OLD | NEW |