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

Side by Side 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, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_VIEWS_AURA_APP_LIST_WINDOW_H_
6 #define CHROME_BROWSER_UI_VIEWS_AURA_APP_LIST_WINDOW_H_
7 #pragma once
8
9 #include "base/memory/scoped_ptr.h"
10 #include "ui/aura/desktop_observer.h"
11 #include "ui/base/animation/animation_delegate.h"
12 #include "views/widget/widget_delegate.h"
13
14 class DOMView;
15
16 namespace ui {
17 class SlideAnimation;
18 }
19
20 namespace views {
21 class Widget;
22 }
23
24 class AppListWindow : public views::WidgetDelegate,
25 public ui::AnimationDelegate,
26 public aura::DesktopObserver {
27 public:
28 // Toggles visibility of app list window.
29 static void Toggle();
30
31 private:
32 AppListWindow();
33 virtual ~AppListWindow();
34
35 // Overridden from views::WidgetDelegate:
36 virtual void DeleteDelegate() OVERRIDE;
37 virtual views::View* GetContentsView() OVERRIDE;
38 virtual void WindowClosing() OVERRIDE;
39 virtual views::Widget* GetWidget() OVERRIDE;
40 virtual const views::Widget* GetWidget() const OVERRIDE;
41
42 // ui::AnimationDelegate overrides:
43 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE;
44 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE;
45
46 // aura::DesktopObserver overrides:
47 virtual void OnActiveWindowChanged(aura::Window* active) OVERRIDE;
48
49 // Initializes the view.
50 void Init();
51
52 // Shows/hides app list window.
53 void Show(bool show, bool animated);
54
55 // Returns true if window is visible or in showing animation.
56 bool IsShowing() const;
57
58 // Sets the window position and opacity based on given animation progress.
59 // 0 is fully hidden and 1 is fully shown.
60 void SetAnimationProgress(double progress);
61
62 // Current visible app list window.
63 static AppListWindow* instance_;
64
65 views::Widget* widget_;
66 DOMView* contents_;
67
68 // Show/hide animation.
69 scoped_ptr<ui::SlideAnimation> animation_;
70
71 DISALLOW_COPY_AND_ASSIGN(AppListWindow);
72 };
73
74
75 #endif // CHROME_BROWSER_UI_VIEWS_AURA_APP_LIST_WINDOW_H_
OLDNEW
« 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