OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_COMMON_WM_SHELL_H_ | 5 #ifndef ASH_COMMON_WM_SHELL_H_ |
6 #define ASH_COMMON_WM_SHELL_H_ | 6 #define ASH_COMMON_WM_SHELL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "ash/ash_export.h" | 13 #include "ash/ash_export.h" |
14 #include "ash/common/media_delegate.h" | 14 #include "ash/common/media_delegate.h" |
15 #include "ash/common/metrics/gesture_action_type.h" | 15 #include "ash/common/metrics/gesture_action_type.h" |
16 #include "ash/common/metrics/user_metrics_action.h" | 16 #include "ash/common/metrics/user_metrics_action.h" |
17 #include "ash/common/wm/lock_state_observer.h" | 17 #include "ash/common/wm/lock_state_observer.h" |
18 #include "base/observer_list.h" | 18 #include "base/observer_list.h" |
19 #include "components/ui_devtools/devtools_server.h" | 19 #include "components/ui_devtools/devtools_server.h" |
| 20 #include "services/catalog/public/interfaces/catalog.mojom.h" |
20 #include "ui/base/ui_base_types.h" | 21 #include "ui/base/ui_base_types.h" |
21 #include "ui/compositor/layer_type.h" | 22 #include "ui/compositor/layer_type.h" |
22 #include "ui/wm/public/window_types.h" | 23 #include "ui/wm/public/window_types.h" |
23 | 24 |
24 namespace base { | 25 namespace base { |
25 class SequencedWorkerPool; | 26 class SequencedWorkerPool; |
26 } | 27 } |
27 | 28 |
28 namespace display { | 29 namespace display { |
29 class Display; | 30 class Display; |
30 class ManagedDisplayInfo; | 31 class ManagedDisplayInfo; |
31 } | 32 } |
32 | 33 |
33 namespace gfx { | 34 namespace gfx { |
34 class Insets; | 35 class Insets; |
35 class Point; | 36 class Point; |
36 } | 37 } |
37 | 38 |
| 39 namespace preferences { |
| 40 class PrefObserverStore; |
| 41 } |
| 42 |
38 namespace views { | 43 namespace views { |
39 class PointerWatcher; | 44 class PointerWatcher; |
40 enum class PointerWatcherEventTypes; | 45 enum class PointerWatcherEventTypes; |
41 } | 46 } |
42 | 47 |
43 namespace ash { | 48 namespace ash { |
44 class AcceleratorController; | 49 class AcceleratorController; |
45 class AccessibilityDelegate; | 50 class AccessibilityDelegate; |
46 class BrightnessControlDelegate; | 51 class BrightnessControlDelegate; |
47 class CastConfigController; | 52 class CastConfigController; |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 return new_window_client_.get(); | 154 return new_window_client_.get(); |
150 } | 155 } |
151 | 156 |
152 // NOTE: Prefer ScopedRootWindowForNewWindows when setting temporarily. | 157 // NOTE: Prefer ScopedRootWindowForNewWindows when setting temporarily. |
153 void set_root_window_for_new_windows(WmWindow* root) { | 158 void set_root_window_for_new_windows(WmWindow* root) { |
154 root_window_for_new_windows_ = root; | 159 root_window_for_new_windows_ = root; |
155 } | 160 } |
156 | 161 |
157 PaletteDelegate* palette_delegate() { return palette_delegate_.get(); } | 162 PaletteDelegate* palette_delegate() { return palette_delegate_.get(); } |
158 | 163 |
| 164 preferences::PrefObserverStore* pref_store() { return pref_store_.get(); } |
| 165 |
159 ShelfController* shelf_controller() { return shelf_controller_.get(); } | 166 ShelfController* shelf_controller() { return shelf_controller_.get(); } |
160 | 167 |
161 ShelfDelegate* shelf_delegate() { return shelf_delegate_.get(); } | 168 ShelfDelegate* shelf_delegate() { return shelf_delegate_.get(); } |
162 | 169 |
163 ShelfModel* shelf_model(); | 170 ShelfModel* shelf_model(); |
164 | 171 |
165 ShutdownController* shutdown_controller() { | 172 ShutdownController* shutdown_controller() { |
166 return shutdown_controller_.get(); | 173 return shutdown_controller_.get(); |
167 } | 174 } |
168 | 175 |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 | 474 |
468 void SetAcceleratorController( | 475 void SetAcceleratorController( |
469 std::unique_ptr<AcceleratorController> accelerator_controller); | 476 std::unique_ptr<AcceleratorController> accelerator_controller); |
470 | 477 |
471 private: | 478 private: |
472 friend class AcceleratorControllerTest; | 479 friend class AcceleratorControllerTest; |
473 friend class ScopedRootWindowForNewWindows; | 480 friend class ScopedRootWindowForNewWindows; |
474 friend class Shell; | 481 friend class Shell; |
475 friend class WmShellTestApi; | 482 friend class WmShellTestApi; |
476 | 483 |
| 484 // Callback for getting entries from |catalog_|. |
| 485 void OnGotCatalogEntries(std::vector<catalog::mojom::EntryPtr> entries); |
| 486 |
477 static WmShell* instance_; | 487 static WmShell* instance_; |
478 | 488 |
479 base::ObserverList<ShellObserver> shell_observers_; | 489 base::ObserverList<ShellObserver> shell_observers_; |
480 std::unique_ptr<ShellDelegate> delegate_; | 490 std::unique_ptr<ShellDelegate> delegate_; |
481 | 491 |
| 492 catalog::mojom::CatalogPtr catalog_; |
| 493 scoped_refptr<preferences::PrefObserverStore> pref_store_; |
| 494 |
482 std::unique_ptr<AcceleratorController> accelerator_controller_; | 495 std::unique_ptr<AcceleratorController> accelerator_controller_; |
483 std::unique_ptr<AccessibilityDelegate> accessibility_delegate_; | 496 std::unique_ptr<AccessibilityDelegate> accessibility_delegate_; |
484 std::unique_ptr<BrightnessControlDelegate> brightness_control_delegate_; | 497 std::unique_ptr<BrightnessControlDelegate> brightness_control_delegate_; |
485 std::unique_ptr<CastConfigController> cast_config_; | 498 std::unique_ptr<CastConfigController> cast_config_; |
486 std::unique_ptr<FocusCycler> focus_cycler_; | 499 std::unique_ptr<FocusCycler> focus_cycler_; |
487 std::unique_ptr<ImmersiveContextAsh> immersive_context_; | 500 std::unique_ptr<ImmersiveContextAsh> immersive_context_; |
488 std::unique_ptr<KeyboardBrightnessControlDelegate> | 501 std::unique_ptr<KeyboardBrightnessControlDelegate> |
489 keyboard_brightness_control_delegate_; | 502 keyboard_brightness_control_delegate_; |
490 std::unique_ptr<KeyboardUI> keyboard_ui_; | 503 std::unique_ptr<KeyboardUI> keyboard_ui_; |
491 std::unique_ptr<LocaleNotificationController> locale_notification_controller_; | 504 std::unique_ptr<LocaleNotificationController> locale_notification_controller_; |
(...skipping 28 matching lines...) Expand all Loading... |
520 | 533 |
521 #if defined(OS_CHROMEOS) | 534 #if defined(OS_CHROMEOS) |
522 std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_; | 535 std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_; |
523 std::unique_ptr<VpnList> vpn_list_; | 536 std::unique_ptr<VpnList> vpn_list_; |
524 #endif | 537 #endif |
525 }; | 538 }; |
526 | 539 |
527 } // namespace ash | 540 } // namespace ash |
528 | 541 |
529 #endif // ASH_COMMON_WM_SHELL_H_ | 542 #endif // ASH_COMMON_WM_SHELL_H_ |
OLD | NEW |