OLD | NEW |
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_observer.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 ui { |
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. |
(...skipping 26 matching lines...) Expand all Loading... |
61 // Otherwise, we just close it. | 61 // Otherwise, we just close it. |
62 void SetView(app_list::AppListView* view); | 62 void SetView(app_list::AppListView* view); |
63 | 63 |
64 // Forgets the view. | 64 // Forgets the view. |
65 void ResetView(); | 65 void ResetView(); |
66 | 66 |
67 // Starts show/hide animation. | 67 // Starts show/hide animation. |
68 void ScheduleAnimation(); | 68 void ScheduleAnimation(); |
69 | 69 |
70 void ProcessLocatedEvent(aura::Window* target, | 70 void ProcessLocatedEvent(aura::Window* target, |
71 const aura::LocatedEvent& event); | 71 const ui::LocatedEvent& event); |
72 | 72 |
73 // Makes app list bubble update its bounds. | 73 // Makes app list bubble update its bounds. |
74 void UpdateBounds(); | 74 void UpdateBounds(); |
75 | 75 |
76 // aura::EventFilter overrides: | 76 // aura::EventFilter overrides: |
77 virtual bool PreHandleKeyEvent(aura::Window* target, | 77 virtual bool PreHandleKeyEvent(aura::Window* target, |
78 aura::KeyEvent* event) OVERRIDE; | 78 ui::KeyEvent* event) OVERRIDE; |
79 virtual bool PreHandleMouseEvent(aura::Window* target, | 79 virtual bool PreHandleMouseEvent(aura::Window* target, |
80 aura::MouseEvent* event) OVERRIDE; | 80 ui::MouseEvent* event) OVERRIDE; |
81 virtual ui::TouchStatus PreHandleTouchEvent(aura::Window* target, | 81 virtual ui::TouchStatus PreHandleTouchEvent( |
82 aura::TouchEvent* event) OVERRIDE; | 82 aura::Window* target, |
| 83 ui::TouchEventImpl* event) OVERRIDE; |
83 virtual ui::GestureStatus PreHandleGestureEvent( | 84 virtual ui::GestureStatus PreHandleGestureEvent( |
84 aura::Window* target, | 85 aura::Window* target, |
85 aura::GestureEvent* event) OVERRIDE; | 86 ui::GestureEventImpl* event) OVERRIDE; |
86 | 87 |
87 // aura::FocusChangeObserver overrides: | 88 // aura::FocusChangeObserver overrides: |
88 virtual void OnWindowFocused(aura::Window* window) OVERRIDE; | 89 virtual void OnWindowFocused(aura::Window* window) OVERRIDE; |
89 | 90 |
90 // aura::RootWindowObserver overrides: | 91 // aura::RootWindowObserver overrides: |
91 virtual void OnRootWindowResized(const aura::RootWindow* root, | 92 virtual void OnRootWindowResized(const aura::RootWindow* root, |
92 const gfx::Size& old_size) OVERRIDE; | 93 const gfx::Size& old_size) OVERRIDE; |
93 | 94 |
94 // ui::ImplicitAnimationObserver overrides: | 95 // ui::ImplicitAnimationObserver overrides: |
95 virtual void OnImplicitAnimationsCompleted() OVERRIDE; | 96 virtual void OnImplicitAnimationsCompleted() OVERRIDE; |
(...skipping 15 matching lines...) Expand all Loading... |
111 // The AppListView this class manages, owned by its widget. | 112 // The AppListView this class manages, owned by its widget. |
112 app_list::AppListView* view_; | 113 app_list::AppListView* view_; |
113 | 114 |
114 DISALLOW_COPY_AND_ASSIGN(AppListController); | 115 DISALLOW_COPY_AND_ASSIGN(AppListController); |
115 }; | 116 }; |
116 | 117 |
117 } // namespace internal | 118 } // namespace internal |
118 } // namespace ash | 119 } // namespace ash |
119 | 120 |
120 #endif // ASH_WM_APP_LIST_CONTROLLER_H_ | 121 #endif // ASH_WM_APP_LIST_CONTROLLER_H_ |
OLD | NEW |