| 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 namespace content { |
| 9 class WebContents; |
| 10 } |
| 9 | 11 |
| 10 namespace chrome { | 12 namespace chrome { |
| 11 namespace search { | 13 namespace search { |
| 12 | 14 |
| 13 // This class defines the observer interface for |ToolbarSearchAnimator|. | 15 // This class defines the observer interface for |ToolbarSearchAnimator|. |
| 14 class ToolbarSearchAnimatorObserver { | 16 class ToolbarSearchAnimatorObserver { |
| 15 public: | 17 public: |
| 16 // Called from ui::AnimationDelegate::AnimationProgressed for fading in | 18 // Called from ui::AnimationDelegate::AnimationProgressed for fading in |
| 17 // toolbar gradient background. | 19 // toolbar gradient background. |
| 18 virtual void OnToolbarBackgroundAnimatorProgressed() = 0; | 20 virtual void OnToolbarBackgroundAnimatorProgressed() = 0; |
| 19 | 21 |
| 20 // Called when toolbar gradient background animation is canceled and jumps to | 22 // Called when toolbar gradient background animation is canceled and jumps to |
| 21 // the end state. | 23 // the end state. |
| 22 // If animation is canceled because the active tab is deactivated or detached | 24 // If animation is canceled because the active tab is deactivated or detached |
| 23 // or closing, |tab_contents| contains the tab's contents. | 25 // or closing, |web_contents| contains the tab's contents. |
| 24 // Otherwise, if animation is canceled because of mode change, |tab_contents| | 26 // Otherwise, if animation is canceled because of mode change, |web_contents| |
| 25 // is NULL. | 27 // is NULL. |
| 26 virtual void OnToolbarBackgroundAnimatorCanceled( | 28 virtual void OnToolbarBackgroundAnimatorCanceled( |
| 27 TabContents* tab_contents) = 0; | 29 content::WebContents* web_contents) = 0; |
| 28 | 30 |
| 29 // Called when toolbar separator visibility has changed. | 31 // Called when toolbar separator visibility has changed. |
| 30 virtual void OnToolbarSeparatorChanged() = 0; | 32 virtual void OnToolbarSeparatorChanged() = 0; |
| 31 | 33 |
| 32 protected: | 34 protected: |
| 33 virtual ~ToolbarSearchAnimatorObserver() {} | 35 virtual ~ToolbarSearchAnimatorObserver() {} |
| 34 }; | 36 }; |
| 35 | 37 |
| 36 } // namespace search | 38 } // namespace search |
| 37 } // namespace chrome | 39 } // namespace chrome |
| 38 | 40 |
| 39 #endif // CHROME_BROWSER_UI_SEARCH_TOOLBAR_SEARCH_ANIMATOR_OBSERVER_H_ | 41 #endif // CHROME_BROWSER_UI_SEARCH_TOOLBAR_SEARCH_ANIMATOR_OBSERVER_H_ |
| OLD | NEW |