| 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 |
| 36 // |frame| is the views::Widget that the caption buttons act on. | 43 // |frame| is the views::Widget that the caption buttons act on. |
| 37 explicit FrameCaptionButtonContainerView(views::Widget* frame); | 44 // |minimize_allowed| indicates whether the frame can be minimized (either via |
| 45 // the maximize/restore button or via a dedicated button). |
| 46 FrameCaptionButtonContainerView(views::Widget* frame, |
| 47 MinimizeAllowed minimize_allowed); |
| 38 virtual ~FrameCaptionButtonContainerView(); | 48 virtual ~FrameCaptionButtonContainerView(); |
| 39 | 49 |
| 40 // For testing. | 50 // For testing. |
| 41 class ASH_EXPORT TestApi { | 51 class ASH_EXPORT TestApi { |
| 42 public: | 52 public: |
| 43 explicit TestApi(FrameCaptionButtonContainerView* container_view) | 53 explicit TestApi(FrameCaptionButtonContainerView* container_view) |
| 44 : container_view_(container_view) { | 54 : container_view_(container_view) { |
| 45 } | 55 } |
| 46 | 56 |
| 47 void EndAnimations(); | 57 void EndAnimations(); |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 // Animation that affects the position of |minimize_button_| and the | 170 // Animation that affects the position of |minimize_button_| and the |
| 161 // visibility of |size_button_|. | 171 // visibility of |size_button_|. |
| 162 scoped_ptr<gfx::SlideAnimation> maximize_mode_animation_; | 172 scoped_ptr<gfx::SlideAnimation> maximize_mode_animation_; |
| 163 | 173 |
| 164 DISALLOW_COPY_AND_ASSIGN(FrameCaptionButtonContainerView); | 174 DISALLOW_COPY_AND_ASSIGN(FrameCaptionButtonContainerView); |
| 165 }; | 175 }; |
| 166 | 176 |
| 167 } // namespace ash | 177 } // namespace ash |
| 168 | 178 |
| 169 #endif // ASH_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_ | 179 #endif // ASH_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_ |
| OLD | NEW |