Chromium Code Reviews| 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 |
| 29 // Called from ui::AnimationDelegate::AnimationProgressed for fading in or out | |
| 30 // the toolbar separator. | |
| 31 virtual void OnToolbarSeparatorAnimatorProgressed() {} | |
|
dhollowa
2012/08/01 22:26:23
Should be pure virtual. ... = 0;
kuan
2012/08/02 21:54:03
method is removed.
| |
| 32 | |
| 33 // Called when the toolbar separator animation is canceled and jumps to the | |
| 34 // end state. | |
| 35 virtual void OnToolbarSeparatorAnimatorCanceled() {} | |
|
dhollowa
2012/08/01 22:26:23
Should be pure virtual. ... = 0;
kuan
2012/08/02 21:54:03
ditto.
| |
| 36 | |
| 27 protected: | 37 protected: |
| 28 virtual ~ToolbarSearchAnimatorObserver() {} | 38 virtual ~ToolbarSearchAnimatorObserver() {} |
| 29 }; | 39 }; |
| 30 | 40 |
| 31 } // namespace search | 41 } // namespace search |
| 32 } // namespace chrome | 42 } // namespace chrome |
| 33 | 43 |
| 34 #endif // CHROME_BROWSER_UI_SEARCH_TOOLBAR_SEARCH_ANIMATOR_OBSERVER_H_ | 44 #endif // CHROME_BROWSER_UI_SEARCH_TOOLBAR_SEARCH_ANIMATOR_OBSERVER_H_ |
| OLD | NEW |