Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(735)

Side by Side Diff: ash/common/wm_shell.h

Issue 2474653003: PreferencesManager (Closed)
Patch Set: Address Review Comments Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
25 class PrefObserverStore;
sadrul 2016/12/06 18:34:29 Shouldn't this be in some namespace?
jonross 2016/12/06 21:09:32 Whoops, yeah missed this when moving from componen
26
24 namespace base { 27 namespace base {
25 class SequencedWorkerPool; 28 class SequencedWorkerPool;
26 } 29 }
27 30
28 namespace display { 31 namespace display {
29 class Display; 32 class Display;
30 class ManagedDisplayInfo; 33 class ManagedDisplayInfo;
31 } 34 }
32 35
33 namespace gfx { 36 namespace gfx {
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 return new_window_client_.get(); 149 return new_window_client_.get();
147 } 150 }
148 151
149 // NOTE: Prefer ScopedRootWindowForNewWindows when setting temporarily. 152 // NOTE: Prefer ScopedRootWindowForNewWindows when setting temporarily.
150 void set_root_window_for_new_windows(WmWindow* root) { 153 void set_root_window_for_new_windows(WmWindow* root) {
151 root_window_for_new_windows_ = root; 154 root_window_for_new_windows_ = root;
152 } 155 }
153 156
154 PaletteDelegate* palette_delegate() { return palette_delegate_.get(); } 157 PaletteDelegate* palette_delegate() { return palette_delegate_.get(); }
155 158
159 PrefObserverStore* pref_store() { return pref_store_.get(); }
160
156 ShelfController* shelf_controller() { return shelf_controller_.get(); } 161 ShelfController* shelf_controller() { return shelf_controller_.get(); }
157 162
158 ShelfDelegate* shelf_delegate() { return shelf_delegate_.get(); } 163 ShelfDelegate* shelf_delegate() { return shelf_delegate_.get(); }
159 164
160 ShelfModel* shelf_model(); 165 ShelfModel* shelf_model();
161 166
162 ShutdownController* shutdown_controller() { 167 ShutdownController* shutdown_controller() {
163 return shutdown_controller_.get(); 168 return shutdown_controller_.get();
164 } 169 }
165 170
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 469
465 void SetAcceleratorController( 470 void SetAcceleratorController(
466 std::unique_ptr<AcceleratorController> accelerator_controller); 471 std::unique_ptr<AcceleratorController> accelerator_controller);
467 472
468 private: 473 private:
469 friend class AcceleratorControllerTest; 474 friend class AcceleratorControllerTest;
470 friend class ScopedRootWindowForNewWindows; 475 friend class ScopedRootWindowForNewWindows;
471 friend class Shell; 476 friend class Shell;
472 friend class WmShellTestApi; 477 friend class WmShellTestApi;
473 478
479 // Callback for getting entries from |catalog_|.
480 void OnGotCatalogEntries(std::vector<catalog::mojom::EntryPtr> entries);
481
474 static WmShell* instance_; 482 static WmShell* instance_;
475 483
476 base::ObserverList<ShellObserver> shell_observers_; 484 base::ObserverList<ShellObserver> shell_observers_;
477 std::unique_ptr<ShellDelegate> delegate_; 485 std::unique_ptr<ShellDelegate> delegate_;
478 486
487 catalog::mojom::CatalogPtr catalog_;
488
479 std::unique_ptr<AcceleratorController> accelerator_controller_; 489 std::unique_ptr<AcceleratorController> accelerator_controller_;
480 std::unique_ptr<AccessibilityDelegate> accessibility_delegate_; 490 std::unique_ptr<AccessibilityDelegate> accessibility_delegate_;
481 std::unique_ptr<BrightnessControlDelegate> brightness_control_delegate_; 491 std::unique_ptr<BrightnessControlDelegate> brightness_control_delegate_;
482 std::unique_ptr<FocusCycler> focus_cycler_; 492 std::unique_ptr<FocusCycler> focus_cycler_;
483 std::unique_ptr<ImmersiveContextAsh> immersive_context_; 493 std::unique_ptr<ImmersiveContextAsh> immersive_context_;
484 std::unique_ptr<KeyboardBrightnessControlDelegate> 494 std::unique_ptr<KeyboardBrightnessControlDelegate>
485 keyboard_brightness_control_delegate_; 495 keyboard_brightness_control_delegate_;
486 std::unique_ptr<KeyboardUI> keyboard_ui_; 496 std::unique_ptr<KeyboardUI> keyboard_ui_;
487 std::unique_ptr<LocaleNotificationController> locale_notification_controller_; 497 std::unique_ptr<LocaleNotificationController> locale_notification_controller_;
488 std::unique_ptr<MaximizeModeController> maximize_mode_controller_; 498 std::unique_ptr<MaximizeModeController> maximize_mode_controller_;
489 std::unique_ptr<MediaDelegate> media_delegate_; 499 std::unique_ptr<MediaDelegate> media_delegate_;
490 std::unique_ptr<MruWindowTracker> mru_window_tracker_; 500 std::unique_ptr<MruWindowTracker> mru_window_tracker_;
491 std::unique_ptr<mojom::NewWindowClient> new_window_client_; 501 std::unique_ptr<mojom::NewWindowClient> new_window_client_;
492 std::unique_ptr<PaletteDelegate> palette_delegate_; 502 std::unique_ptr<PaletteDelegate> palette_delegate_;
503 scoped_refptr<PrefObserverStore> pref_store_;
493 std::unique_ptr<ShelfController> shelf_controller_; 504 std::unique_ptr<ShelfController> shelf_controller_;
494 std::unique_ptr<ShelfDelegate> shelf_delegate_; 505 std::unique_ptr<ShelfDelegate> shelf_delegate_;
495 std::unique_ptr<ShelfWindowWatcher> shelf_window_watcher_; 506 std::unique_ptr<ShelfWindowWatcher> shelf_window_watcher_;
496 std::unique_ptr<ShutdownController> shutdown_controller_; 507 std::unique_ptr<ShutdownController> shutdown_controller_;
497 std::unique_ptr<SystemTrayController> system_tray_controller_; 508 std::unique_ptr<SystemTrayController> system_tray_controller_;
498 std::unique_ptr<SystemTrayNotifier> system_tray_notifier_; 509 std::unique_ptr<SystemTrayNotifier> system_tray_notifier_;
499 std::unique_ptr<SystemTrayDelegate> system_tray_delegate_; 510 std::unique_ptr<SystemTrayDelegate> system_tray_delegate_;
500 std::unique_ptr<ToastManager> toast_manager_; 511 std::unique_ptr<ToastManager> toast_manager_;
501 std::unique_ptr<WallpaperController> wallpaper_controller_; 512 std::unique_ptr<WallpaperController> wallpaper_controller_;
502 std::unique_ptr<WallpaperDelegate> wallpaper_delegate_; 513 std::unique_ptr<WallpaperDelegate> wallpaper_delegate_;
(...skipping 13 matching lines...) Expand all
516 527
517 #if defined(OS_CHROMEOS) 528 #if defined(OS_CHROMEOS)
518 std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_; 529 std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_;
519 std::unique_ptr<VpnList> vpn_list_; 530 std::unique_ptr<VpnList> vpn_list_;
520 #endif 531 #endif
521 }; 532 };
522 533
523 } // namespace ash 534 } // namespace ash
524 535
525 #endif // ASH_COMMON_WM_SHELL_H_ 536 #endif // ASH_COMMON_WM_SHELL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698