| 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
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a54abce6352ce27b297c25bef0b78ae8db718f14
|
| --- /dev/null
|
| +++ b/chrome/browser/ui/views/aura/app_list_window.h
|
| @@ -0,0 +1,75 @@
|
| +// Copyright (c) 2011 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_VIEWS_AURA_APP_LIST_WINDOW_H_
|
| +#define CHROME_BROWSER_UI_VIEWS_AURA_APP_LIST_WINDOW_H_
|
| +#pragma once
|
| +
|
| +#include "base/memory/scoped_ptr.h"
|
| +#include "ui/aura/desktop_observer.h"
|
| +#include "ui/base/animation/animation_delegate.h"
|
| +#include "views/widget/widget_delegate.h"
|
| +
|
| +class DOMView;
|
| +
|
| +namespace ui {
|
| +class SlideAnimation;
|
| +}
|
| +
|
| +namespace views {
|
| +class Widget;
|
| +}
|
| +
|
| +class AppListWindow : public views::WidgetDelegate,
|
| + public ui::AnimationDelegate,
|
| + public aura::DesktopObserver {
|
| + public:
|
| + // Toggles visibility of app list window.
|
| + static void Toggle();
|
| +
|
| + private:
|
| + AppListWindow();
|
| + virtual ~AppListWindow();
|
| +
|
| + // Overridden from views::WidgetDelegate:
|
| + 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;
|
| +
|
| + // ui::AnimationDelegate overrides:
|
| + virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE;
|
| + virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE;
|
| +
|
| + // aura::DesktopObserver overrides:
|
| + virtual void OnActiveWindowChanged(aura::Window* active) OVERRIDE;
|
| +
|
| + // Initializes the view.
|
| + void Init();
|
| +
|
| + // Shows/hides app list window.
|
| + void Show(bool show, bool animated);
|
| +
|
| + // Returns true if window is visible or in showing animation.
|
| + bool IsShowing() const;
|
| +
|
| + // Sets the window position and opacity based on given animation progress.
|
| + // 0 is fully hidden and 1 is fully shown.
|
| + void SetAnimationProgress(double progress);
|
| +
|
| + // Current visible app list window.
|
| + static AppListWindow* instance_;
|
| +
|
| + views::Widget* widget_;
|
| + DOMView* contents_;
|
| +
|
| + // Show/hide animation.
|
| + scoped_ptr<ui::SlideAnimation> animation_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(AppListWindow);
|
| +};
|
| +
|
| +
|
| +#endif // CHROME_BROWSER_UI_VIEWS_AURA_APP_LIST_WINDOW_H_
|
|
|