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

Side by Side Diff: ash/wm/app_list_controller.h

Issue 10834079: views: Extract Widget observer into its own header file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/touch/touch_observer_hud.h ('k') | ash/wm/app_list_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ASH_WM_APP_LIST_CONTROLLER_H_ 5 #ifndef ASH_WM_APP_LIST_CONTROLLER_H_
6 #define ASH_WM_APP_LIST_CONTROLLER_H_ 6 #define ASH_WM_APP_LIST_CONTROLLER_H_
7 7
8 #include "ash/launcher/launcher_icon_observer.h" 8 #include "ash/launcher/launcher_icon_observer.h"
9 #include "ash/shell_observer.h" 9 #include "ash/shell_observer.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/timer.h" 12 #include "base/timer.h"
13 #include "ui/aura/event_filter.h" 13 #include "ui/aura/event_filter.h"
14 #include "ui/aura/focus_change_observer.h" 14 #include "ui/aura/focus_change_observer.h"
15 #include "ui/aura/root_window_observer.h" 15 #include "ui/aura/root_window_observer.h"
16 #include "ui/compositor/layer_animation_observer.h" 16 #include "ui/compositor/layer_animation_observer.h"
17 #include "ui/views/widget/widget.h" 17 #include "ui/views/widget/widget_observer.h"
18 18
19 namespace app_list { 19 namespace app_list {
20 class AppListView; 20 class AppListView;
21 class PaginationModel; 21 class PaginationModel;
22 } 22 }
23 23
24 namespace aura { 24 namespace aura {
25 class LocatedEvent; 25 class LocatedEvent;
26 } 26 }
27 27
28 namespace ash { 28 namespace ash {
29 namespace internal { 29 namespace internal {
30 30
31 // AppListController is a controller that manages app list UI for shell. 31 // AppListController is a controller that manages app list UI for shell.
32 // It creates AppListView and schedules showing/hiding animation. 32 // It creates AppListView and schedules showing/hiding animation.
33 // While the UI is visible, it monitors things such as app list widget's 33 // While the UI is visible, it monitors things such as app list widget's
34 // activation state and desktop mouse click to auto dismiss the UI. 34 // activation state and desktop mouse click to auto dismiss the UI.
35 class AppListController : public aura::EventFilter, 35 class AppListController : public aura::EventFilter,
36 public aura::FocusChangeObserver, 36 public aura::FocusChangeObserver,
37 public aura::RootWindowObserver, 37 public aura::RootWindowObserver,
38 public ui::ImplicitAnimationObserver, 38 public ui::ImplicitAnimationObserver,
39 public views::Widget::Observer, 39 public views::WidgetObserver,
40 public ShellObserver, 40 public ShellObserver,
41 public LauncherIconObserver { 41 public LauncherIconObserver {
42 public: 42 public:
43 AppListController(); 43 AppListController();
44 virtual ~AppListController(); 44 virtual ~AppListController();
45 45
46 // Show/hide app list window. 46 // Show/hide app list window.
47 void SetVisible(bool visible); 47 void SetVisible(bool visible);
48 48
49 // Whether app list window is visible (shown or being shown). 49 // Whether app list window is visible (shown or being shown).
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // aura::FocusChangeObserver overrides: 87 // aura::FocusChangeObserver overrides:
88 virtual void OnWindowFocused(aura::Window* window) OVERRIDE; 88 virtual void OnWindowFocused(aura::Window* window) OVERRIDE;
89 89
90 // aura::RootWindowObserver overrides: 90 // aura::RootWindowObserver overrides:
91 virtual void OnRootWindowResized(const aura::RootWindow* root, 91 virtual void OnRootWindowResized(const aura::RootWindow* root,
92 const gfx::Size& old_size) OVERRIDE; 92 const gfx::Size& old_size) OVERRIDE;
93 93
94 // ui::ImplicitAnimationObserver overrides: 94 // ui::ImplicitAnimationObserver overrides:
95 virtual void OnImplicitAnimationsCompleted() OVERRIDE; 95 virtual void OnImplicitAnimationsCompleted() OVERRIDE;
96 96
97 // views::Widget::Observer overrides: 97 // views::WidgetObserver overrides:
98 virtual void OnWidgetClosing(views::Widget* widget) OVERRIDE; 98 virtual void OnWidgetClosing(views::Widget* widget) OVERRIDE;
99 99
100 // ShellObserver overrides: 100 // ShellObserver overrides:
101 virtual void OnShelfAlignmentChanged() OVERRIDE; 101 virtual void OnShelfAlignmentChanged() OVERRIDE;
102 102
103 // LauncherIconObserver overrides: 103 // LauncherIconObserver overrides:
104 virtual void OnLauncherIconPositionsChanged() OVERRIDE; 104 virtual void OnLauncherIconPositionsChanged() OVERRIDE;
105 105
106 scoped_ptr<app_list::PaginationModel> pagination_model_; 106 scoped_ptr<app_list::PaginationModel> pagination_model_;
107 107
108 // Whether we should show or hide app list widget. 108 // Whether we should show or hide app list widget.
109 bool is_visible_; 109 bool is_visible_;
110 110
111 // The AppListView this class manages, owned by its widget. 111 // The AppListView this class manages, owned by its widget.
112 app_list::AppListView* view_; 112 app_list::AppListView* view_;
113 113
114 DISALLOW_COPY_AND_ASSIGN(AppListController); 114 DISALLOW_COPY_AND_ASSIGN(AppListController);
115 }; 115 };
116 116
117 } // namespace internal 117 } // namespace internal
118 } // namespace ash 118 } // namespace ash
119 119
120 #endif // ASH_WM_APP_LIST_CONTROLLER_H_ 120 #endif // ASH_WM_APP_LIST_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ash/touch/touch_observer_hud.h ('k') | ash/wm/app_list_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698