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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 AcceleratorControllerDelegateAura; | 80 class AcceleratorControllerDelegateAura; |
84 class AppListController; | |
85 class AshNativeCursorManager; | 81 class AshNativeCursorManager; |
86 class AutoclickController; | 82 class AutoclickController; |
87 class BluetoothNotificationController; | 83 class BluetoothNotificationController; |
88 class CaptureController; | 84 class CaptureController; |
89 class DesktopBackgroundController; | 85 class DesktopBackgroundController; |
90 class DisplayChangeObserver; | 86 class DisplayChangeObserver; |
91 class DisplayColorManager; | 87 class DisplayColorManager; |
92 class DisplayConfigurationController; | 88 class DisplayConfigurationController; |
93 class WindowTreeHostManager; | 89 class WindowTreeHostManager; |
94 class DisplayErrorObserver; | 90 class DisplayErrorObserver; |
(...skipping 26 matching lines...) Expand all Loading... |
121 class ScopedTargetRootWindow; | 117 class ScopedTargetRootWindow; |
122 class ScreenAsh; | 118 class ScreenAsh; |
123 class ScreenOrientationController; | 119 class ScreenOrientationController; |
124 class ScreenshotController; | 120 class ScreenshotController; |
125 class ScreenPinningController; | 121 class ScreenPinningController; |
126 class ScreenPositionController; | 122 class ScreenPositionController; |
127 class SessionStateDelegate; | 123 class SessionStateDelegate; |
128 class Shelf; | 124 class Shelf; |
129 class ShelfDelegate; | 125 class ShelfDelegate; |
130 class ShelfItemDelegateManager; | 126 class ShelfItemDelegateManager; |
131 class ShelfModel; | |
132 class ShelfWindowWatcher; | 127 class ShelfWindowWatcher; |
133 class ShellDelegate; | 128 class ShellDelegate; |
134 struct ShellInitParams; | 129 struct ShellInitParams; |
135 class SlowAnimationEventFilter; | 130 class SlowAnimationEventFilter; |
136 class StatusAreaWidget; | 131 class StatusAreaWidget; |
137 class StickyKeysController; | 132 class StickyKeysController; |
138 class SystemGestureEventFilter; | 133 class SystemGestureEventFilter; |
139 class SystemModalContainerEventFilter; | 134 class SystemModalContainerEventFilter; |
140 class SystemTray; | 135 class SystemTray; |
141 class ToastManager; | 136 class ToastManager; |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 | 218 |
224 void set_target_root_window(aura::Window* target_root_window) { | 219 void set_target_root_window(aura::Window* target_root_window) { |
225 target_root_window_ = target_root_window; | 220 target_root_window_ = target_root_window; |
226 } | 221 } |
227 | 222 |
228 // Shows the context menu for the background and launcher at | 223 // Shows the context menu for the background and launcher at |
229 // |location_in_screen| (in screen coordinates). | 224 // |location_in_screen| (in screen coordinates). |
230 void ShowContextMenu(const gfx::Point& location_in_screen, | 225 void ShowContextMenu(const gfx::Point& location_in_screen, |
231 ui::MenuSourceType source_type); | 226 ui::MenuSourceType source_type); |
232 | 227 |
233 // Shows the app list. |window| specifies in which display the app | |
234 // list should be shown. If this is NULL, the active root window | |
235 // will be used. | |
236 void ShowAppList(aura::Window* anchor); | |
237 | |
238 // Dismisses the app list. | |
239 void DismissAppList(); | |
240 | |
241 // Shows the app list if it's not visible. Dismisses it otherwise. | |
242 void ToggleAppList(aura::Window* anchor); | |
243 | |
244 // Returns app list actual visibility. This might differ from | |
245 // GetAppListTargetVisibility() when hiding animation is still in flight. | |
246 bool IsApplistVisible() const; | |
247 | |
248 // Returns app list target visibility. | |
249 bool GetAppListTargetVisibility() const; | |
250 | |
251 // Creates a default views::NonClientFrameView for use by windows in the | 228 // Creates a default views::NonClientFrameView for use by windows in the |
252 // Ash environment. | 229 // Ash environment. |
253 views::NonClientFrameView* CreateDefaultNonClientFrameView( | 230 views::NonClientFrameView* CreateDefaultNonClientFrameView( |
254 views::Widget* widget); | 231 views::Widget* widget); |
255 | 232 |
256 // Sets the work area insets of the display that contains |window|, | 233 // Sets the work area insets of the display that contains |window|, |
257 // this notifies observers too. | 234 // this notifies observers too. |
258 // TODO(sky): this no longer really replicates what happens and is unreliable. | 235 // TODO(sky): this no longer really replicates what happens and is unreliable. |
259 // Remove this. | 236 // Remove this. |
260 void SetDisplayWorkAreaInsets(aura::Window* window, | 237 void SetDisplayWorkAreaInsets(aura::Window* window, |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 | 450 |
474 VirtualKeyboardController* virtual_keyboard_controller() { | 451 VirtualKeyboardController* virtual_keyboard_controller() { |
475 return virtual_keyboard_controller_.get(); | 452 return virtual_keyboard_controller_.get(); |
476 } | 453 } |
477 | 454 |
478 chromeos::AudioA11yController* audio_a11y_controller() { | 455 chromeos::AudioA11yController* audio_a11y_controller() { |
479 return audio_a11y_controller_.get(); | 456 return audio_a11y_controller_.get(); |
480 } | 457 } |
481 #endif // defined(OS_CHROMEOS) | 458 #endif // defined(OS_CHROMEOS) |
482 | 459 |
483 ShelfModel* shelf_model() { return shelf_model_.get(); } | |
484 | |
485 WindowPositioner* window_positioner() { return window_positioner_.get(); } | 460 WindowPositioner* window_positioner() { return window_positioner_.get(); } |
486 | 461 |
487 // Returns the launcher delegate, creating if necesary. | 462 // Returns the launcher delegate, creating if necesary. |
488 ShelfDelegate* GetShelfDelegate(); | 463 ShelfDelegate* GetShelfDelegate(); |
489 | 464 |
490 UserMetricsRecorder* metrics() { return user_metrics_recorder_.get(); } | 465 UserMetricsRecorder* metrics() { return user_metrics_recorder_.get(); } |
491 | 466 |
492 void SetTouchHudProjectionEnabled(bool enabled); | 467 void SetTouchHudProjectionEnabled(bool enabled); |
493 | 468 |
494 bool is_touch_hud_projection_enabled() const { | 469 bool is_touch_hud_projection_enabled() const { |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
589 std::unique_ptr<AcceleratorControllerDelegateAura> | 564 std::unique_ptr<AcceleratorControllerDelegateAura> |
590 accelerator_controller_delegate_; | 565 accelerator_controller_delegate_; |
591 std::unique_ptr<AcceleratorController> accelerator_controller_; | 566 std::unique_ptr<AcceleratorController> accelerator_controller_; |
592 std::unique_ptr<UserWallpaperDelegate> user_wallpaper_delegate_; | 567 std::unique_ptr<UserWallpaperDelegate> user_wallpaper_delegate_; |
593 std::unique_ptr<SessionStateDelegate> session_state_delegate_; | 568 std::unique_ptr<SessionStateDelegate> session_state_delegate_; |
594 std::unique_ptr<NewWindowDelegate> new_window_delegate_; | 569 std::unique_ptr<NewWindowDelegate> new_window_delegate_; |
595 std::unique_ptr<PointerDownWatcherDelegate> pointer_down_watcher_delegate_; | 570 std::unique_ptr<PointerDownWatcherDelegate> pointer_down_watcher_delegate_; |
596 std::unique_ptr<ShelfDelegate> shelf_delegate_; | 571 std::unique_ptr<ShelfDelegate> shelf_delegate_; |
597 std::unique_ptr<ShelfItemDelegateManager> shelf_item_delegate_manager_; | 572 std::unique_ptr<ShelfItemDelegateManager> shelf_item_delegate_manager_; |
598 std::unique_ptr<ShelfWindowWatcher> shelf_window_watcher_; | 573 std::unique_ptr<ShelfWindowWatcher> shelf_window_watcher_; |
599 | |
600 std::unique_ptr<ShelfModel> shelf_model_; | |
601 std::unique_ptr<WindowPositioner> window_positioner_; | 574 std::unique_ptr<WindowPositioner> window_positioner_; |
602 | 575 |
603 std::unique_ptr<DragDropController> drag_drop_controller_; | 576 std::unique_ptr<DragDropController> drag_drop_controller_; |
604 std::unique_ptr<ResizeShadowController> resize_shadow_controller_; | 577 std::unique_ptr<ResizeShadowController> resize_shadow_controller_; |
605 std::unique_ptr<::wm::ShadowController> shadow_controller_; | 578 std::unique_ptr<::wm::ShadowController> shadow_controller_; |
606 std::unique_ptr<::wm::VisibilityController> visibility_controller_; | 579 std::unique_ptr<::wm::VisibilityController> visibility_controller_; |
607 std::unique_ptr<::wm::WindowModalityController> window_modality_controller_; | 580 std::unique_ptr<::wm::WindowModalityController> window_modality_controller_; |
608 std::unique_ptr<views::corewm::TooltipController> tooltip_controller_; | 581 std::unique_ptr<views::corewm::TooltipController> tooltip_controller_; |
609 std::unique_ptr<DesktopBackgroundController> desktop_background_controller_; | 582 std::unique_ptr<DesktopBackgroundController> desktop_background_controller_; |
610 LinkHandlerModelFactory* link_handler_model_factory_; | 583 LinkHandlerModelFactory* link_handler_model_factory_; |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 base::SequencedWorkerPool* blocking_pool_; | 676 base::SequencedWorkerPool* blocking_pool_; |
704 | 677 |
705 bool in_mus_ = false; | 678 bool in_mus_ = false; |
706 | 679 |
707 DISALLOW_COPY_AND_ASSIGN(Shell); | 680 DISALLOW_COPY_AND_ASSIGN(Shell); |
708 }; | 681 }; |
709 | 682 |
710 } // namespace ash | 683 } // namespace ash |
711 | 684 |
712 #endif // ASH_SHELL_H_ | 685 #endif // ASH_SHELL_H_ |
OLD | NEW |