| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 | 89 |
| 90 // Updates the size button's visibility based on whether |frame_| can be | 90 // Updates the size button's visibility based on whether |frame_| can be |
| 91 // maximized and if maximize mode is enabled. A parent view should relayout | 91 // maximized and if maximize mode is enabled. A parent view should relayout |
| 92 // to reflect the change in visibility. | 92 // to reflect the change in visibility. |
| 93 void UpdateSizeButtonVisibility(); | 93 void UpdateSizeButtonVisibility(); |
| 94 | 94 |
| 95 // Sets the size of the buttons in this container. | 95 // Sets the size of the buttons in this container. |
| 96 void SetButtonSize(const gfx::Size& size); | 96 void SetButtonSize(const gfx::Size& size); |
| 97 | 97 |
| 98 // views::View: | 98 // views::View: |
| 99 gfx::Size GetPreferredSize() const override; | 99 gfx::Size CalculatePreferredSize() const override; |
| 100 void Layout() override; | 100 void Layout() override; |
| 101 const char* GetClassName() const override; | 101 const char* GetClassName() const override; |
| 102 | 102 |
| 103 // gfx::AnimationDelegate: | 103 // gfx::AnimationDelegate: |
| 104 void AnimationEnded(const gfx::Animation* animation) override; | 104 void AnimationEnded(const gfx::Animation* animation) override; |
| 105 void AnimationProgressed(const gfx::Animation* animation) override; | 105 void AnimationProgressed(const gfx::Animation* animation) override; |
| 106 | 106 |
| 107 private: | 107 private: |
| 108 friend class FrameCaptionButtonContainerViewTest; | 108 friend class FrameCaptionButtonContainerViewTest; |
| 109 | 109 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 // Animation that affects the position of |minimize_button_| and the | 149 // Animation that affects the position of |minimize_button_| and the |
| 150 // visibility of |size_button_|. | 150 // visibility of |size_button_|. |
| 151 std::unique_ptr<gfx::SlideAnimation> maximize_mode_animation_; | 151 std::unique_ptr<gfx::SlideAnimation> maximize_mode_animation_; |
| 152 | 152 |
| 153 DISALLOW_COPY_AND_ASSIGN(FrameCaptionButtonContainerView); | 153 DISALLOW_COPY_AND_ASSIGN(FrameCaptionButtonContainerView); |
| 154 }; | 154 }; |
| 155 | 155 |
| 156 } // namespace ash | 156 } // namespace ash |
| 157 | 157 |
| 158 #endif // ASH_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_ | 158 #endif // ASH_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_ |
| OLD | NEW |