| 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/app_list/pagination_model_observer.h" | 13 #include "ui/app_list/pagination_model_observer.h" |
| 14 #include "ui/aura/focus_change_observer.h" | 14 #include "ui/aura/client/focus_change_observer.h" |
| 15 #include "ui/aura/root_window_observer.h" | 15 #include "ui/aura/root_window_observer.h" |
| 16 #include "ui/base/events/event_handler.h" | 16 #include "ui/base/events/event_handler.h" |
| 17 #include "ui/compositor/layer_animation_observer.h" | 17 #include "ui/compositor/layer_animation_observer.h" |
| 18 #include "ui/gfx/rect.h" | 18 #include "ui/gfx/rect.h" |
| 19 #include "ui/views/widget/widget_observer.h" | 19 #include "ui/views/widget/widget_observer.h" |
| 20 | 20 |
| 21 namespace app_list { | 21 namespace app_list { |
| 22 class AppListView; | 22 class AppListView; |
| 23 class PaginationModel; | 23 class PaginationModel; |
| 24 } | 24 } |
| 25 | 25 |
| 26 namespace ui { | 26 namespace ui { |
| 27 class LocatedEvent; | 27 class LocatedEvent; |
| 28 } | 28 } |
| 29 | 29 |
| 30 namespace ash { | 30 namespace ash { |
| 31 namespace internal { | 31 namespace internal { |
| 32 | 32 |
| 33 // AppListController is a controller that manages app list UI for shell. | 33 // AppListController is a controller that manages app list UI for shell. |
| 34 // It creates AppListView and schedules showing/hiding animation. | 34 // It creates AppListView and schedules showing/hiding animation. |
| 35 // While the UI is visible, it monitors things such as app list widget's | 35 // While the UI is visible, it monitors things such as app list widget's |
| 36 // activation state and desktop mouse click to auto dismiss the UI. | 36 // activation state and desktop mouse click to auto dismiss the UI. |
| 37 class AppListController : public ui::EventHandler, | 37 class AppListController : public ui::EventHandler, |
| 38 public aura::FocusChangeObserver, | 38 public aura::client::FocusChangeObserver, |
| 39 public aura::RootWindowObserver, | 39 public aura::RootWindowObserver, |
| 40 public ui::ImplicitAnimationObserver, | 40 public ui::ImplicitAnimationObserver, |
| 41 public views::WidgetObserver, | 41 public views::WidgetObserver, |
| 42 public ShellObserver, | 42 public ShellObserver, |
| 43 public LauncherIconObserver, | 43 public LauncherIconObserver, |
| 44 public app_list::PaginationModelObserver { | 44 public app_list::PaginationModelObserver { |
| 45 public: | 45 public: |
| 46 AppListController(); | 46 AppListController(); |
| 47 virtual ~AppListController(); | 47 virtual ~AppListController(); |
| 48 | 48 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 72 | 72 |
| 73 void ProcessLocatedEvent(ui::LocatedEvent* event); | 73 void ProcessLocatedEvent(ui::LocatedEvent* event); |
| 74 | 74 |
| 75 // Makes app list bubble update its bounds. | 75 // Makes app list bubble update its bounds. |
| 76 void UpdateBounds(); | 76 void UpdateBounds(); |
| 77 | 77 |
| 78 // ui::EventHandler overrides: | 78 // ui::EventHandler overrides: |
| 79 virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE; | 79 virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE; |
| 80 virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE; | 80 virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE; |
| 81 | 81 |
| 82 // aura::FocusChangeObserver overrides: | 82 // aura::client::FocusChangeObserver overrides: |
| 83 virtual void OnWindowFocused(aura::Window* window) OVERRIDE; | 83 virtual void OnWindowFocused(aura::Window* window) OVERRIDE; |
| 84 | 84 |
| 85 // aura::RootWindowObserver overrides: | 85 // aura::RootWindowObserver overrides: |
| 86 virtual void OnRootWindowResized(const aura::RootWindow* root, | 86 virtual void OnRootWindowResized(const aura::RootWindow* root, |
| 87 const gfx::Size& old_size) OVERRIDE; | 87 const gfx::Size& old_size) OVERRIDE; |
| 88 | 88 |
| 89 // ui::ImplicitAnimationObserver overrides: | 89 // ui::ImplicitAnimationObserver overrides: |
| 90 virtual void OnImplicitAnimationsCompleted() OVERRIDE; | 90 virtual void OnImplicitAnimationsCompleted() OVERRIDE; |
| 91 | 91 |
| 92 // views::WidgetObserver overrides: | 92 // views::WidgetObserver overrides: |
| (...skipping 24 matching lines...) Expand all Loading... |
| 117 // Whether should schedule snap back animation. | 117 // Whether should schedule snap back animation. |
| 118 bool should_snap_back_; | 118 bool should_snap_back_; |
| 119 | 119 |
| 120 DISALLOW_COPY_AND_ASSIGN(AppListController); | 120 DISALLOW_COPY_AND_ASSIGN(AppListController); |
| 121 }; | 121 }; |
| 122 | 122 |
| 123 } // namespace internal | 123 } // namespace internal |
| 124 } // namespace ash | 124 } // namespace ash |
| 125 | 125 |
| 126 #endif // ASH_WM_APP_LIST_CONTROLLER_H_ | 126 #endif // ASH_WM_APP_LIST_CONTROLLER_H_ |
| OLD | NEW |