| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 FrameCaptionButtonContainerView* container_view_; | 62 FrameCaptionButtonContainerView* container_view_; |
| 63 | 63 |
| 64 DISALLOW_COPY_AND_ASSIGN(TestApi); | 64 DISALLOW_COPY_AND_ASSIGN(TestApi); |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 // Sets the resource ids of the images to paint the button for |icon|. The | 67 // Sets the resource ids of the images to paint the button for |icon|. The |
| 68 // FrameCaptionButtonContainerView will keep track of the images to use for | 68 // FrameCaptionButtonContainerView will keep track of the images to use for |
| 69 // |icon| even if none of the buttons currently use |icon|. | 69 // |icon| even if none of the buttons currently use |icon|. |
| 70 void SetButtonImages(CaptionButtonIcon icon, | 70 void SetButtonImages(CaptionButtonIcon icon, |
| 71 int icon_image_id, | 71 int icon_image_id, |
| 72 int inactive_icon_image_id, | |
| 73 int hovered_background_image_id, | 72 int hovered_background_image_id, |
| 74 int pressed_background_image_id); | 73 int pressed_background_image_id); |
| 75 | 74 |
| 76 // Sets whether the buttons should be painted as active. Does not schedule | 75 // Sets whether the buttons should be painted as active. Does not schedule |
| 77 // a repaint. | 76 // a repaint. |
| 78 void SetPaintAsActive(bool paint_as_active); | 77 void SetPaintAsActive(bool paint_as_active); |
| 79 | 78 |
| 80 // Tell the window controls to reset themselves to the normal state. | 79 // Tell the window controls to reset themselves to the normal state. |
| 81 void ResetWindowControls(); | 80 void ResetWindowControls(); |
| 82 | 81 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 98 // Overridden from gfx::AnimationDelegate: | 97 // Overridden from gfx::AnimationDelegate: |
| 99 void AnimationEnded(const gfx::Animation* animation) override; | 98 void AnimationEnded(const gfx::Animation* animation) override; |
| 100 void AnimationProgressed(const gfx::Animation* animation) override; | 99 void AnimationProgressed(const gfx::Animation* animation) override; |
| 101 | 100 |
| 102 private: | 101 private: |
| 103 friend class FrameCaptionButtonContainerViewTest; | 102 friend class FrameCaptionButtonContainerViewTest; |
| 104 | 103 |
| 105 struct ButtonIconIds { | 104 struct ButtonIconIds { |
| 106 ButtonIconIds(); | 105 ButtonIconIds(); |
| 107 ButtonIconIds(int icon_id, | 106 ButtonIconIds(int icon_id, |
| 108 int inactive_icon_id, | |
| 109 int hovered_background_id, | 107 int hovered_background_id, |
| 110 int pressed_background_id); | 108 int pressed_background_id); |
| 111 ~ButtonIconIds(); | 109 ~ButtonIconIds(); |
| 112 | 110 |
| 113 int icon_image_id; | 111 int icon_image_id; |
| 114 int inactive_icon_image_id; | |
| 115 int hovered_background_image_id; | 112 int hovered_background_image_id; |
| 116 int pressed_background_image_id; | 113 int pressed_background_image_id; |
| 117 }; | 114 }; |
| 118 | 115 |
| 119 // Sets |button|'s icon to |icon|. If |animate| is ANIMATE_YES, the button | 116 // Sets |button|'s icon to |icon|. If |animate| is ANIMATE_YES, the button |
| 120 // will crossfade to the new icon. If |animate| is ANIMATE_NO and | 117 // will crossfade to the new icon. If |animate| is ANIMATE_NO and |
| 121 // |icon| == |button|->icon(), the crossfade animation is progressed to the | 118 // |icon| == |button|->icon(), the crossfade animation is progressed to the |
| 122 // end. | 119 // end. |
| 123 void SetButtonIcon(FrameCaptionButton* button, | 120 void SetButtonIcon(FrameCaptionButton* button, |
| 124 CaptionButtonIcon icon, | 121 CaptionButtonIcon icon, |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 // Animation that affects the position of |minimize_button_| and the | 155 // Animation that affects the position of |minimize_button_| and the |
| 159 // visibility of |size_button_|. | 156 // visibility of |size_button_|. |
| 160 scoped_ptr<gfx::SlideAnimation> maximize_mode_animation_; | 157 scoped_ptr<gfx::SlideAnimation> maximize_mode_animation_; |
| 161 | 158 |
| 162 DISALLOW_COPY_AND_ASSIGN(FrameCaptionButtonContainerView); | 159 DISALLOW_COPY_AND_ASSIGN(FrameCaptionButtonContainerView); |
| 163 }; | 160 }; |
| 164 | 161 |
| 165 } // namespace ash | 162 } // namespace ash |
| 166 | 163 |
| 167 #endif // ASH_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_ | 164 #endif // ASH_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_ |
| OLD | NEW |