OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 ASH_WM_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_ | 5 #ifndef ASH_WM_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_ |
6 #define ASH_WM_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_ | 6 #define ASH_WM_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "ui/gfx/image/image_skia.h" | 9 #include "ui/gfx/image/image_skia.h" |
10 #include "ui/views/controls/button/button.h" | 10 #include "ui/views/controls/button/button.h" |
11 #include "ui/views/view.h" | 11 #include "ui/views/view.h" |
12 | 12 |
13 namespace views { | 13 namespace views { |
14 class CustomButton; | 14 class CustomButton; |
15 class Widget; | 15 class Widget; |
16 } | 16 } |
17 | 17 |
18 namespace ash { | 18 namespace ash { |
| 19 class FrameMaximizeButton; |
19 | 20 |
20 // Container view for the frame caption buttons. It performs the appropriate | 21 // Container view for the frame caption buttons. It performs the appropriate |
21 // action when a caption button is clicked. | 22 // action when a caption button is clicked. |
22 class ASH_EXPORT FrameCaptionButtonContainerView | 23 class ASH_EXPORT FrameCaptionButtonContainerView |
23 : public views::View, | 24 : public views::View, |
24 public views::ButtonListener { | 25 public views::ButtonListener { |
25 public: | 26 public: |
26 static const char kViewClassName[]; | 27 static const char kViewClassName[]; |
27 | 28 |
28 // Whether the frame can be minimized (either via the maximize/restore button | 29 // Whether the frame can be minimized (either via the maximize/restore button |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 views::CustomButton* close_button() const { | 68 views::CustomButton* close_button() const { |
68 return container_view_->close_button_; | 69 return container_view_->close_button_; |
69 } | 70 } |
70 | 71 |
71 private: | 72 private: |
72 FrameCaptionButtonContainerView* container_view_; | 73 FrameCaptionButtonContainerView* container_view_; |
73 | 74 |
74 DISALLOW_COPY_AND_ASSIGN(TestApi); | 75 DISALLOW_COPY_AND_ASSIGN(TestApi); |
75 }; | 76 }; |
76 | 77 |
| 78 // Returns the size button if using the old caption button style, returns NULL |
| 79 // otherwise. |
| 80 FrameMaximizeButton* GetOldStyleSizeButton(); |
| 81 |
77 // Tell the window controls to reset themselves to the normal state. | 82 // Tell the window controls to reset themselves to the normal state. |
78 void ResetWindowControls(); | 83 void ResetWindowControls(); |
79 | 84 |
80 // Determines the window HT* code for the caption button at |point|. Returns | 85 // Determines the window HT* code for the caption button at |point|. Returns |
81 // HTNOWHERE if |point| is not over any of the caption buttons. |point| must | 86 // HTNOWHERE if |point| is not over any of the caption buttons. |point| must |
82 // be in the coordinates of the FrameCaptionButtonContainerView. | 87 // be in the coordinates of the FrameCaptionButtonContainerView. |
83 int NonClientHitTest(const gfx::Point& point) const; | 88 int NonClientHitTest(const gfx::Point& point) const; |
84 | 89 |
85 // Sets the header style. | 90 // Sets the header style. |
86 void set_header_style(HeaderStyle header_style) { | 91 void set_header_style(HeaderStyle header_style) { |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 views::CustomButton* minimize_button_; | 138 views::CustomButton* minimize_button_; |
134 views::CustomButton* size_button_; | 139 views::CustomButton* size_button_; |
135 views::CustomButton* close_button_; | 140 views::CustomButton* close_button_; |
136 | 141 |
137 DISALLOW_COPY_AND_ASSIGN(FrameCaptionButtonContainerView); | 142 DISALLOW_COPY_AND_ASSIGN(FrameCaptionButtonContainerView); |
138 }; | 143 }; |
139 | 144 |
140 } // namesapace ash | 145 } // namesapace ash |
141 | 146 |
142 #endif // ASH_WM_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_ | 147 #endif // ASH_WM_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_ |
OLD | NEW |