Index: chrome/browser/ui/views/aura/app_list_window.h |
diff --git a/chrome/browser/ui/views/aura/app_list_window.h b/chrome/browser/ui/views/aura/app_list_window.h |
index 282bf1f85d3fe2a69ee416939880d02b09f25558..347028b3624147765b2fc1133ec8bc248600cb7f 100644 |
--- a/chrome/browser/ui/views/aura/app_list_window.h |
+++ b/chrome/browser/ui/views/aura/app_list_window.h |
@@ -8,8 +8,7 @@ |
#include "base/memory/scoped_ptr.h" |
#include "chrome/browser/tab_first_render_watcher.h" |
-#include "ui/aura/desktop_observer.h" |
-#include "ui/gfx/compositor/layer_animation_observer.h" |
+#include "ui/aura_shell/shell_delegate.h" |
#include "views/widget/widget_delegate.h" |
class DOMView; |
@@ -19,38 +18,20 @@ class Widget; |
} |
class AppListWindow : public views::WidgetDelegate, |
- public aura::DesktopObserver, |
- public ui::LayerAnimationObserver, |
public TabFirstRenderWatcher::Delegate { |
public: |
- // Show/hide app list window. |
- static void SetVisible(bool visible); |
- |
- // Whether app list window is visible (shown or being shown). |
- static bool IsVisible(); |
+ explicit AppListWindow( |
+ const aura_shell::ShellDelegate::SetWidgetCallback& callback); |
private: |
- AppListWindow(); |
virtual ~AppListWindow(); |
// views::WidgetDelegate overrides: |
virtual void DeleteDelegate() OVERRIDE; |
virtual views::View* GetContentsView() OVERRIDE; |
- virtual void WindowClosing() OVERRIDE; |
virtual views::Widget* GetWidget() OVERRIDE; |
virtual const views::Widget* GetWidget() const OVERRIDE; |
- // aura::DesktopObserver overrides: |
- virtual void OnActiveWindowChanged(aura::Window* active) OVERRIDE; |
- |
- // ui::LayerAnimationObserver overrides: |
- virtual void OnLayerAnimationEnded( |
- const ui::LayerAnimationSequence* sequence) OVERRIDE; |
- virtual void OnLayerAnimationAborted( |
- const ui::LayerAnimationSequence* sequence) OVERRIDE; |
- virtual void OnLayerAnimationScheduled( |
- const ui::LayerAnimationSequence* sequence) OVERRIDE; |
- |
// TabFirstRenderWatcher::Delegate implementation: |
virtual void OnRenderHostCreated(RenderViewHost* host) OVERRIDE; |
virtual void OnTabMainFrameLoaded() OVERRIDE; |
@@ -59,22 +40,14 @@ class AppListWindow : public views::WidgetDelegate, |
// Initializes the window. |
void Init(); |
- // Shows/hides the window. |
- void DoSetVisible(bool visible); |
- |
- // Current visible app list window. |
- static AppListWindow* instance_; |
- |
views::Widget* widget_; |
DOMView* contents_; |
- bool is_visible_; |
// Monitors TabContents and set |content_rendered_| flag when it's rendered. |
scoped_ptr<TabFirstRenderWatcher> tab_watcher_; |
- // Flag of whether the web contents is rendered. Showing animation is |
- // deferred until this flag is set to true. |
- bool content_rendered_; |
+ // Callback to set app list widget when it's ready. |
+ aura_shell::ShellDelegate::SetWidgetCallback callback_; |
DISALLOW_COPY_AND_ASSIGN(AppListWindow); |
}; |