OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CHROME_BROWSER_UI_VIEWS_TABS_ALERT_INDICATOR_BUTTON_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_ALERT_INDICATOR_BUTTON_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_TABS_ALERT_INDICATOR_BUTTON_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TABS_ALERT_INDICATOR_BUTTON_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "chrome/browser/ui/tabs/tab_utils.h" | 11 #include "chrome/browser/ui/tabs/tab_utils.h" |
11 #include "ui/views/controls/button/image_button.h" | 12 #include "ui/views/controls/button/image_button.h" |
12 #include "ui/views/view_targeter_delegate.h" | 13 #include "ui/views/view_targeter_delegate.h" |
13 | 14 |
14 class Tab; | 15 class Tab; |
15 | 16 |
16 namespace gfx { | 17 namespace gfx { |
17 class Animation; | 18 class Animation; |
18 class AnimationDelegate; | 19 class AnimationDelegate; |
19 } | 20 } |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 // Resets the images to display on the button to reflect |state| and the | 85 // Resets the images to display on the button to reflect |state| and the |
85 // parent tab's button color. Should be called when either of these changes. | 86 // parent tab's button color. Should be called when either of these changes. |
86 void ResetImages(TabAlertState state); | 87 void ResetImages(TabAlertState state); |
87 | 88 |
88 Tab* const parent_tab_; | 89 Tab* const parent_tab_; |
89 | 90 |
90 TabAlertState alert_state_; | 91 TabAlertState alert_state_; |
91 | 92 |
92 // Alert indicator fade-in/out animation (i.e., only on show/hide, not a | 93 // Alert indicator fade-in/out animation (i.e., only on show/hide, not a |
93 // continuous animation). | 94 // continuous animation). |
94 scoped_ptr<gfx::AnimationDelegate> fade_animation_delegate_; | 95 std::unique_ptr<gfx::AnimationDelegate> fade_animation_delegate_; |
95 scoped_ptr<gfx::Animation> fade_animation_; | 96 std::unique_ptr<gfx::Animation> fade_animation_; |
96 TabAlertState showing_alert_state_; | 97 TabAlertState showing_alert_state_; |
97 | 98 |
98 DISALLOW_COPY_AND_ASSIGN(AlertIndicatorButton); | 99 DISALLOW_COPY_AND_ASSIGN(AlertIndicatorButton); |
99 }; | 100 }; |
100 | 101 |
101 #endif // CHROME_BROWSER_UI_VIEWS_TABS_ALERT_INDICATOR_BUTTON_H_ | 102 #endif // CHROME_BROWSER_UI_VIEWS_TABS_ALERT_INDICATOR_BUTTON_H_ |
OLD | NEW |