Chromium Code Reviews| Index: chrome/browser/ui/search/toolbar_search_animator_observer.h |
| diff --git a/chrome/browser/ui/search/toolbar_search_animator_observer.h b/chrome/browser/ui/search/toolbar_search_animator_observer.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..633c08691cbf9f661fe9b5da2716ee04cf550c43 |
| --- /dev/null |
| +++ b/chrome/browser/ui/search/toolbar_search_animator_observer.h |
| @@ -0,0 +1,37 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_UI_SEARCH_TOOLBAR_SEARCH_ANIMATOR_OBSERVER_H_ |
| +#define CHROME_BROWSER_UI_SEARCH_TOOLBAR_SEARCH_ANIMATOR_OBSERVER_H_ |
| +#pragma once |
| + |
| +class TabContents; |
| + |
| +namespace chrome { |
| +namespace search { |
| + |
| +// This class defines the observer interface for |ToolbarSearchAnimator|. |
| +class ToolbarSearchAnimatorObserver { |
| + public: |
| + // Called from ui::AnimationDelegate::AnimationProgressed. |
| + virtual void BackgroundChanging() = 0; |
|
sky
2012/06/26 17:11:27
These names should better match the interface: OnT
kuan
2012/06/26 23:25:49
Done.
|
| + |
| + // Called from ui::AnimationDelegate::AnimationEnded. |
| + virtual void BackgroundChanged() = 0; |
| + |
| + // Called when animation is canceled and jumps to the end state. |
| + // If animation is canceled because the active tab is deactivated or detached |
| + // or closing, |tab_contents| contains the tab's contents. |
| + // Otherwise, if animation is canceled because of mode change, |tab_contents| |
| + // is NULL. |
| + virtual void BackgroundChangeCanceled(TabContents* tab_contents) = 0; |
| + |
| + protected: |
| + virtual ~ToolbarSearchAnimatorObserver() {} |
| +}; |
| + |
| +} // namespace search |
| +} // namespace chrome |
| + |
| +#endif // CHROME_BROWSER_UI_SEARCH_TOOLBAR_SEARCH_ANIMATOR_OBSERVER_H_ |