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 NonClientFrameView; | |
16 class Widget; | 15 class Widget; |
17 } | 16 } |
18 | 17 |
19 namespace ash { | 18 namespace ash { |
20 | 19 |
21 // Container view for the frame caption buttons. It performs the appropriate | 20 // Container view for the frame caption buttons. It performs the appropriate |
22 // action when a caption button is clicked. | 21 // action when a caption button is clicked. |
23 class ASH_EXPORT FrameCaptionButtonContainerView | 22 class ASH_EXPORT FrameCaptionButtonContainerView |
24 : public views::View, | 23 : public views::View, |
25 public views::ButtonListener { | 24 public views::ButtonListener { |
(...skipping 12 matching lines...) Expand all Loading... |
38 HEADER_STYLE_SHORT, | 37 HEADER_STYLE_SHORT, |
39 | 38 |
40 // Restored tabbed browser windows, popups for browser windows, restored | 39 // Restored tabbed browser windows, popups for browser windows, restored |
41 // hosted app windows, popups for hosted app windows. | 40 // hosted app windows, popups for hosted app windows. |
42 HEADER_STYLE_TALL, | 41 HEADER_STYLE_TALL, |
43 | 42 |
44 // AppNonClientFrameViewAsh. | 43 // AppNonClientFrameViewAsh. |
45 HEADER_STYLE_MAXIMIZED_HOSTED_APP | 44 HEADER_STYLE_MAXIMIZED_HOSTED_APP |
46 }; | 45 }; |
47 | 46 |
48 // |frame_view| and |frame| are the NonClientFrameView and the views::Widget | 47 // |frame| is the views::Widget that the caption buttons act on. |
49 // that the caption buttons act on. | |
50 // |minimize_allowed| indicates whether the frame can be minimized (either via | 48 // |minimize_allowed| indicates whether the frame can be minimized (either via |
51 // the maximize/restore button or via a dedicated button). | 49 // the maximize/restore button or via a dedicated button). |
52 // TODO(pkotwicz): Remove the |frame_view| parameter once FrameMaximizeButton | 50 FrameCaptionButtonContainerView(views::Widget* frame, |
53 // is refactored to take in a views::Widget instead. | |
54 FrameCaptionButtonContainerView(views::NonClientFrameView* frame_view, | |
55 views::Widget* frame, | |
56 MinimizeAllowed minimize_allowed); | 51 MinimizeAllowed minimize_allowed); |
57 virtual ~FrameCaptionButtonContainerView(); | 52 virtual ~FrameCaptionButtonContainerView(); |
58 | 53 |
59 // For testing. | 54 // For testing. |
60 class TestApi { | 55 class TestApi { |
61 public: | 56 public: |
62 explicit TestApi(FrameCaptionButtonContainerView* container_view) | 57 explicit TestApi(FrameCaptionButtonContainerView* container_view) |
63 : container_view_(container_view) { | 58 : container_view_(container_view) { |
64 } | 59 } |
65 | 60 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 views::CustomButton* minimize_button_; | 135 views::CustomButton* minimize_button_; |
141 views::CustomButton* size_button_; | 136 views::CustomButton* size_button_; |
142 views::CustomButton* close_button_; | 137 views::CustomButton* close_button_; |
143 | 138 |
144 DISALLOW_COPY_AND_ASSIGN(FrameCaptionButtonContainerView); | 139 DISALLOW_COPY_AND_ASSIGN(FrameCaptionButtonContainerView); |
145 }; | 140 }; |
146 | 141 |
147 } // namesapace ash | 142 } // namesapace ash |
148 | 143 |
149 #endif // ASH_WM_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_ | 144 #endif // ASH_WM_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_ |
OLD | NEW |