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_SHELL_H_ | 5 #ifndef ASH_SHELL_H_ |
6 #define ASH_SHELL_H_ | 6 #define ASH_SHELL_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "ash/ash_export.h" | 12 #include "ash/ash_export.h" |
13 #include "ash/common/shelf/shelf_types.h" | 13 #include "ash/common/shelf/shelf_types.h" |
14 #include "ash/metrics/user_metrics_recorder.h" | 14 #include "ash/metrics/user_metrics_recorder.h" |
15 #include "ash/wm/cursor_manager_chromeos.h" | 15 #include "ash/wm/cursor_manager_chromeos.h" |
16 #include "ash/wm/system_modal_container_event_filter_delegate.h" | 16 #include "ash/wm/system_modal_container_event_filter_delegate.h" |
17 #include "base/gtest_prod_util.h" | 17 #include "base/gtest_prod_util.h" |
18 #include "base/macros.h" | 18 #include "base/macros.h" |
19 #include "base/memory/weak_ptr.h" | 19 #include "base/memory/weak_ptr.h" |
20 #include "base/observer_list.h" | 20 #include "base/observer_list.h" |
21 #include "ui/aura/window.h" | 21 #include "ui/aura/window.h" |
22 #include "ui/base/ui_base_types.h" | 22 #include "ui/base/ui_base_types.h" |
23 #include "ui/display/screen.h" | 23 #include "ui/display/screen.h" |
24 #include "ui/events/event_target.h" | 24 #include "ui/events/event_target.h" |
25 #include "ui/gfx/geometry/insets.h" | 25 #include "ui/gfx/geometry/insets.h" |
26 #include "ui/gfx/geometry/size.h" | 26 #include "ui/gfx/geometry/size.h" |
27 #include "ui/wm/core/cursor_manager.h" | 27 #include "ui/wm/core/cursor_manager.h" |
28 #include "ui/wm/public/activation_change_observer.h" | 28 #include "ui/wm/public/activation_change_observer.h" |
29 | 29 |
30 namespace app_list { | |
31 class AppListView; | |
32 } | |
33 namespace aura { | 30 namespace aura { |
34 class EventFilter; | 31 class EventFilter; |
35 class RootWindow; | 32 class RootWindow; |
36 class Window; | 33 class Window; |
37 namespace client { | 34 namespace client { |
38 class ActivationClient; | 35 class ActivationClient; |
39 class FocusClient; | 36 class FocusClient; |
40 } | 37 } |
41 } | 38 } |
42 | 39 |
(...skipping 30 matching lines...) Expand all Loading... |
73 class AcceleratorFilter; | 70 class AcceleratorFilter; |
74 class CompoundEventFilter; | 71 class CompoundEventFilter; |
75 class ShadowController; | 72 class ShadowController; |
76 class VisibilityController; | 73 class VisibilityController; |
77 class WindowModalityController; | 74 class WindowModalityController; |
78 } | 75 } |
79 | 76 |
80 namespace ash { | 77 namespace ash { |
81 | 78 |
82 class AcceleratorController; | 79 class AcceleratorController; |
83 class AppListController; | |
84 class AshNativeCursorManager; | 80 class AshNativeCursorManager; |
85 class AutoclickController; | 81 class AutoclickController; |
86 class BluetoothNotificationController; | 82 class BluetoothNotificationController; |
87 class CaptureController; | 83 class CaptureController; |
88 class DesktopBackgroundController; | 84 class DesktopBackgroundController; |
89 class DisplayChangeObserver; | 85 class DisplayChangeObserver; |
90 class DisplayColorManager; | 86 class DisplayColorManager; |
91 class DisplayConfigurationController; | 87 class DisplayConfigurationController; |
92 class WindowTreeHostManager; | 88 class WindowTreeHostManager; |
93 class DisplayErrorObserver; | 89 class DisplayErrorObserver; |
(...skipping 26 matching lines...) Expand all Loading... |
120 class ScopedTargetRootWindow; | 116 class ScopedTargetRootWindow; |
121 class ScreenAsh; | 117 class ScreenAsh; |
122 class ScreenOrientationController; | 118 class ScreenOrientationController; |
123 class ScreenshotController; | 119 class ScreenshotController; |
124 class ScreenPinningController; | 120 class ScreenPinningController; |
125 class ScreenPositionController; | 121 class ScreenPositionController; |
126 class SessionStateDelegate; | 122 class SessionStateDelegate; |
127 class Shelf; | 123 class Shelf; |
128 class ShelfDelegate; | 124 class ShelfDelegate; |
129 class ShelfItemDelegateManager; | 125 class ShelfItemDelegateManager; |
130 class ShelfModel; | |
131 class ShelfWindowWatcher; | 126 class ShelfWindowWatcher; |
132 class ShellDelegate; | 127 class ShellDelegate; |
133 struct ShellInitParams; | 128 struct ShellInitParams; |
134 class SlowAnimationEventFilter; | 129 class SlowAnimationEventFilter; |
135 class StatusAreaWidget; | 130 class StatusAreaWidget; |
136 class StickyKeysController; | 131 class StickyKeysController; |
137 class SystemGestureEventFilter; | 132 class SystemGestureEventFilter; |
138 class SystemModalContainerEventFilter; | 133 class SystemModalContainerEventFilter; |
139 class SystemTray; | 134 class SystemTray; |
140 class ToastManager; | 135 class ToastManager; |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 | 217 |
223 void set_target_root_window(aura::Window* target_root_window) { | 218 void set_target_root_window(aura::Window* target_root_window) { |
224 target_root_window_ = target_root_window; | 219 target_root_window_ = target_root_window; |
225 } | 220 } |
226 | 221 |
227 // Shows the context menu for the background and launcher at | 222 // Shows the context menu for the background and launcher at |
228 // |location_in_screen| (in screen coordinates). | 223 // |location_in_screen| (in screen coordinates). |
229 void ShowContextMenu(const gfx::Point& location_in_screen, | 224 void ShowContextMenu(const gfx::Point& location_in_screen, |
230 ui::MenuSourceType source_type); | 225 ui::MenuSourceType source_type); |
231 | 226 |
232 // Shows the app list. |window| specifies in which display the app | |
233 // list should be shown. If this is NULL, the active root window | |
234 // will be used. | |
235 void ShowAppList(aura::Window* anchor); | |
236 | |
237 // Dismisses the app list. | |
238 void DismissAppList(); | |
239 | |
240 // Shows the app list if it's not visible. Dismisses it otherwise. | |
241 void ToggleAppList(aura::Window* anchor); | |
242 | |
243 // Returns app list actual visibility. This might differ from | |
244 // GetAppListTargetVisibility() when hiding animation is still in flight. | |
245 bool IsApplistVisible() const; | |
246 | |
247 // Returns app list target visibility. | |
248 bool GetAppListTargetVisibility() const; | |
249 | |
250 // Creates a default views::NonClientFrameView for use by windows in the | 227 // Creates a default views::NonClientFrameView for use by windows in the |
251 // Ash environment. | 228 // Ash environment. |
252 views::NonClientFrameView* CreateDefaultNonClientFrameView( | 229 views::NonClientFrameView* CreateDefaultNonClientFrameView( |
253 views::Widget* widget); | 230 views::Widget* widget); |
254 | 231 |
255 // Sets the work area insets of the display that contains |window|, | 232 // Sets the work area insets of the display that contains |window|, |
256 // this notifies observers too. | 233 // this notifies observers too. |
257 // TODO(sky): this no longer really replicates what happens and is unreliable. | 234 // TODO(sky): this no longer really replicates what happens and is unreliable. |
258 // Remove this. | 235 // Remove this. |
259 void SetDisplayWorkAreaInsets(aura::Window* window, | 236 void SetDisplayWorkAreaInsets(aura::Window* window, |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 | 446 |
470 VirtualKeyboardController* virtual_keyboard_controller() { | 447 VirtualKeyboardController* virtual_keyboard_controller() { |
471 return virtual_keyboard_controller_.get(); | 448 return virtual_keyboard_controller_.get(); |
472 } | 449 } |
473 | 450 |
474 chromeos::AudioA11yController* audio_a11y_controller() { | 451 chromeos::AudioA11yController* audio_a11y_controller() { |
475 return audio_a11y_controller_.get(); | 452 return audio_a11y_controller_.get(); |
476 } | 453 } |
477 #endif // defined(OS_CHROMEOS) | 454 #endif // defined(OS_CHROMEOS) |
478 | 455 |
479 ShelfModel* shelf_model() { return shelf_model_.get(); } | |
480 | |
481 WindowPositioner* window_positioner() { return window_positioner_.get(); } | 456 WindowPositioner* window_positioner() { return window_positioner_.get(); } |
482 | 457 |
483 // Returns the launcher delegate, creating if necesary. | 458 // Returns the launcher delegate, creating if necesary. |
484 ShelfDelegate* GetShelfDelegate(); | 459 ShelfDelegate* GetShelfDelegate(); |
485 | 460 |
486 UserMetricsRecorder* metrics() { return user_metrics_recorder_.get(); } | 461 UserMetricsRecorder* metrics() { return user_metrics_recorder_.get(); } |
487 | 462 |
488 void SetTouchHudProjectionEnabled(bool enabled); | 463 void SetTouchHudProjectionEnabled(bool enabled); |
489 | 464 |
490 bool is_touch_hud_projection_enabled() const { | 465 bool is_touch_hud_projection_enabled() const { |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 | 558 |
584 std::unique_ptr<UserMetricsRecorder> user_metrics_recorder_; | 559 std::unique_ptr<UserMetricsRecorder> user_metrics_recorder_; |
585 std::unique_ptr<AcceleratorController> accelerator_controller_; | 560 std::unique_ptr<AcceleratorController> accelerator_controller_; |
586 std::unique_ptr<UserWallpaperDelegate> user_wallpaper_delegate_; | 561 std::unique_ptr<UserWallpaperDelegate> user_wallpaper_delegate_; |
587 std::unique_ptr<SessionStateDelegate> session_state_delegate_; | 562 std::unique_ptr<SessionStateDelegate> session_state_delegate_; |
588 std::unique_ptr<NewWindowDelegate> new_window_delegate_; | 563 std::unique_ptr<NewWindowDelegate> new_window_delegate_; |
589 std::unique_ptr<PointerWatcherDelegate> pointer_watcher_delegate_; | 564 std::unique_ptr<PointerWatcherDelegate> pointer_watcher_delegate_; |
590 std::unique_ptr<ShelfDelegate> shelf_delegate_; | 565 std::unique_ptr<ShelfDelegate> shelf_delegate_; |
591 std::unique_ptr<ShelfItemDelegateManager> shelf_item_delegate_manager_; | 566 std::unique_ptr<ShelfItemDelegateManager> shelf_item_delegate_manager_; |
592 std::unique_ptr<ShelfWindowWatcher> shelf_window_watcher_; | 567 std::unique_ptr<ShelfWindowWatcher> shelf_window_watcher_; |
593 | |
594 std::unique_ptr<ShelfModel> shelf_model_; | |
595 std::unique_ptr<WindowPositioner> window_positioner_; | 568 std::unique_ptr<WindowPositioner> window_positioner_; |
596 | 569 |
597 std::unique_ptr<DragDropController> drag_drop_controller_; | 570 std::unique_ptr<DragDropController> drag_drop_controller_; |
598 std::unique_ptr<ResizeShadowController> resize_shadow_controller_; | 571 std::unique_ptr<ResizeShadowController> resize_shadow_controller_; |
599 std::unique_ptr<::wm::ShadowController> shadow_controller_; | 572 std::unique_ptr<::wm::ShadowController> shadow_controller_; |
600 std::unique_ptr<::wm::VisibilityController> visibility_controller_; | 573 std::unique_ptr<::wm::VisibilityController> visibility_controller_; |
601 std::unique_ptr<::wm::WindowModalityController> window_modality_controller_; | 574 std::unique_ptr<::wm::WindowModalityController> window_modality_controller_; |
602 std::unique_ptr<views::corewm::TooltipController> tooltip_controller_; | 575 std::unique_ptr<views::corewm::TooltipController> tooltip_controller_; |
603 std::unique_ptr<DesktopBackgroundController> desktop_background_controller_; | 576 std::unique_ptr<DesktopBackgroundController> desktop_background_controller_; |
604 LinkHandlerModelFactory* link_handler_model_factory_; | 577 LinkHandlerModelFactory* link_handler_model_factory_; |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
697 base::SequencedWorkerPool* blocking_pool_; | 670 base::SequencedWorkerPool* blocking_pool_; |
698 | 671 |
699 bool in_mus_ = false; | 672 bool in_mus_ = false; |
700 | 673 |
701 DISALLOW_COPY_AND_ASSIGN(Shell); | 674 DISALLOW_COPY_AND_ASSIGN(Shell); |
702 }; | 675 }; |
703 | 676 |
704 } // namespace ash | 677 } // namespace ash |
705 | 678 |
706 #endif // ASH_SHELL_H_ | 679 #endif // ASH_SHELL_H_ |
OLD | NEW |