Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(221)

Unified Diff: chrome/browser/ui/views/aura/app_list_window.h

Issue 8394003: [Aura] A temp app list window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_
« no previous file with comments | « no previous file | chrome/browser/ui/views/aura/app_list_window.cc » ('j') | chrome/browser/ui/views/aura/app_list_window.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698