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_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_ | 5 #ifndef ASH_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_ |
6 #define ASH_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_ | 6 #define ASH_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
(...skipping 15 matching lines...) Expand all Loading... | |
26 // Container view for the frame caption buttons. It performs the appropriate | 26 // Container view for the frame caption buttons. It performs the appropriate |
27 // action when a caption button is clicked. | 27 // action when a caption button is clicked. |
28 class ASH_EXPORT FrameCaptionButtonContainerView | 28 class ASH_EXPORT FrameCaptionButtonContainerView |
29 : public views::View, | 29 : public views::View, |
30 public views::ButtonListener, | 30 public views::ButtonListener, |
31 public FrameSizeButtonDelegate, | 31 public FrameSizeButtonDelegate, |
32 public gfx::AnimationDelegate { | 32 public gfx::AnimationDelegate { |
33 public: | 33 public: |
34 static const char kViewClassName[]; | 34 static const char kViewClassName[]; |
35 | 35 |
36 // Whether the frame can be minimized (either via the maximize/restore button | |
37 // or via a dedicated button). | |
38 enum MinimizeAllowed { | |
39 MINIMIZE_ALLOWED, | |
40 MINIMIZE_DISALLOWED | |
41 }; | |
42 | |
43 // |frame| is the views::Widget that the caption buttons act on. | 36 // |frame| is the views::Widget that the caption buttons act on. |
44 // |minimize_allowed| indicates whether the frame can be minimized (either via | 37 FrameCaptionButtonContainerView(views::Widget* frame); |
pkotwicz
2014/09/19 03:34:31
explicit
| |
45 // the maximize/restore button or via a dedicated button). | |
46 FrameCaptionButtonContainerView(views::Widget* frame, | |
47 MinimizeAllowed minimize_allowed); | |
48 virtual ~FrameCaptionButtonContainerView(); | 38 virtual ~FrameCaptionButtonContainerView(); |
49 | 39 |
50 // For testing. | 40 // For testing. |
51 class ASH_EXPORT TestApi { | 41 class ASH_EXPORT TestApi { |
52 public: | 42 public: |
53 explicit TestApi(FrameCaptionButtonContainerView* container_view) | 43 explicit TestApi(FrameCaptionButtonContainerView* container_view) |
54 : container_view_(container_view) { | 44 : container_view_(container_view) { |
55 } | 45 } |
56 | 46 |
57 void EndAnimations(); | 47 void EndAnimations(); |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
170 // Animation that affects the position of |minimize_button_| and the | 160 // Animation that affects the position of |minimize_button_| and the |
171 // visibility of |size_button_|. | 161 // visibility of |size_button_|. |
172 scoped_ptr<gfx::SlideAnimation> maximize_mode_animation_; | 162 scoped_ptr<gfx::SlideAnimation> maximize_mode_animation_; |
173 | 163 |
174 DISALLOW_COPY_AND_ASSIGN(FrameCaptionButtonContainerView); | 164 DISALLOW_COPY_AND_ASSIGN(FrameCaptionButtonContainerView); |
175 }; | 165 }; |
176 | 166 |
177 } // namespace ash | 167 } // namespace ash |
178 | 168 |
179 #endif // ASH_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_ | 169 #endif // ASH_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_ |
OLD | NEW |