OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_SEARCH_TOOLBAR_SEARCH_ANIMATOR_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_UI_SEARCH_TOOLBAR_SEARCH_ANIMATOR_OBSERVER_H_ |
6 #define CHROME_BROWSER_UI_SEARCH_TOOLBAR_SEARCH_ANIMATOR_OBSERVER_H_ | 6 #define CHROME_BROWSER_UI_SEARCH_TOOLBAR_SEARCH_ANIMATOR_OBSERVER_H_ |
7 | 7 |
8 class TabContents; | 8 class TabContents; |
9 | 9 |
10 namespace chrome { | 10 namespace chrome { |
11 namespace search { | 11 namespace search { |
12 | 12 |
13 // This class defines the observer interface for |ToolbarSearchAnimator|. | 13 // This class defines the observer interface for |ToolbarSearchAnimator|. |
14 class ToolbarSearchAnimatorObserver { | 14 class ToolbarSearchAnimatorObserver { |
15 public: | 15 public: |
16 // Called from ui::AnimationDelegate::AnimationProgressed. | 16 // Called from ui::AnimationDelegate::AnimationProgressed for fading in |
| 17 // toolbar gradient background. |
17 virtual void OnToolbarBackgroundAnimatorProgressed() = 0; | 18 virtual void OnToolbarBackgroundAnimatorProgressed() = 0; |
18 | 19 |
19 // Called when animation is canceled and jumps to the end state. | 20 // Called when toolbar gradient background animation is canceled and jumps to |
| 21 // the end state. |
20 // If animation is canceled because the active tab is deactivated or detached | 22 // If animation is canceled because the active tab is deactivated or detached |
21 // or closing, |tab_contents| contains the tab's contents. | 23 // or closing, |tab_contents| contains the tab's contents. |
22 // Otherwise, if animation is canceled because of mode change, |tab_contents| | 24 // Otherwise, if animation is canceled because of mode change, |tab_contents| |
23 // is NULL. | 25 // is NULL. |
24 virtual void OnToolbarBackgroundAnimatorCanceled( | 26 virtual void OnToolbarBackgroundAnimatorCanceled( |
25 TabContents* tab_contents) = 0; | 27 TabContents* tab_contents) = 0; |
26 | 28 |
27 protected: | 29 protected: |
28 virtual ~ToolbarSearchAnimatorObserver() {} | 30 virtual ~ToolbarSearchAnimatorObserver() {} |
29 }; | 31 }; |
30 | 32 |
31 } // namespace search | 33 } // namespace search |
32 } // namespace chrome | 34 } // namespace chrome |
33 | 35 |
34 #endif // CHROME_BROWSER_UI_SEARCH_TOOLBAR_SEARCH_ANIMATOR_OBSERVER_H_ | 36 #endif // CHROME_BROWSER_UI_SEARCH_TOOLBAR_SEARCH_ANIMATOR_OBSERVER_H_ |
OLD | NEW |