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

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

Issue 2644893003: Unify Preferences Mojom Naming to PreferencesService (Closed)
Patch Set: / Created 3 years, 11 months 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
« no previous file with comments | « ash/common/wm_shell.h ('k') | chrome/browser/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "ash/common/wm_shell.h" 5 #include "ash/common/wm_shell.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/common/accelerators/accelerator_controller.h" 9 #include "ash/common/accelerators/accelerator_controller.h"
10 #include "ash/common/accelerators/ash_focus_manager_factory.h" 10 #include "ash/common/accelerators/ash_focus_manager_factory.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #include "ash/common/wm/system_modal_container_layout_manager.h" 47 #include "ash/common/wm/system_modal_container_layout_manager.h"
48 #include "ash/common/wm/window_cycle_controller.h" 48 #include "ash/common/wm/window_cycle_controller.h"
49 #include "ash/common/wm_activation_observer.h" 49 #include "ash/common/wm_activation_observer.h"
50 #include "ash/common/wm_window.h" 50 #include "ash/common/wm_window.h"
51 #include "ash/public/cpp/shell_window_ids.h" 51 #include "ash/public/cpp/shell_window_ids.h"
52 #include "ash/root_window_controller.h" 52 #include "ash/root_window_controller.h"
53 #include "ash/shell.h" 53 #include "ash/shell.h"
54 #include "base/bind.h" 54 #include "base/bind.h"
55 #include "base/logging.h" 55 #include "base/logging.h"
56 #include "base/memory/ptr_util.h" 56 #include "base/memory/ptr_util.h"
57 #include "services/preferences/public/cpp/pref_observer_store.h" 57 #include "services/preferences/public/cpp/pref_client_store.h"
58 #include "services/preferences/public/interfaces/preferences.mojom.h" 58 #include "services/preferences/public/interfaces/preferences.mojom.h"
59 #include "services/service_manager/public/cpp/connector.h" 59 #include "services/service_manager/public/cpp/connector.h"
60 #include "ui/app_list/presenter/app_list.h" 60 #include "ui/app_list/presenter/app_list.h"
61 #include "ui/display/display.h" 61 #include "ui/display/display.h"
62 #include "ui/views/focus/focus_manager_factory.h" 62 #include "ui/views/focus/focus_manager_factory.h"
63 #include "ui/wm/public/activation_client.h" 63 #include "ui/wm/public/activation_client.h"
64 64
65 namespace ash { 65 namespace ash {
66 66
67 // static 67 // static
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 shutdown_controller_(base::MakeUnique<ShutdownController>()), 286 shutdown_controller_(base::MakeUnique<ShutdownController>()),
287 system_tray_controller_(base::MakeUnique<SystemTrayController>()), 287 system_tray_controller_(base::MakeUnique<SystemTrayController>()),
288 system_tray_notifier_(base::MakeUnique<SystemTrayNotifier>()), 288 system_tray_notifier_(base::MakeUnique<SystemTrayNotifier>()),
289 vpn_list_(base::MakeUnique<VpnList>()), 289 vpn_list_(base::MakeUnique<VpnList>()),
290 wallpaper_delegate_(delegate_->CreateWallpaperDelegate()), 290 wallpaper_delegate_(delegate_->CreateWallpaperDelegate()),
291 window_cycle_controller_(base::MakeUnique<WindowCycleController>()), 291 window_cycle_controller_(base::MakeUnique<WindowCycleController>()),
292 window_selector_controller_( 292 window_selector_controller_(
293 base::MakeUnique<WindowSelectorController>()) { 293 base::MakeUnique<WindowSelectorController>()) {
294 session_controller_->AddSessionStateObserver(this); 294 session_controller_->AddSessionStateObserver(this);
295 295
296 prefs::mojom::PreferencesFactoryPtr pref_factory_ptr; 296 prefs::mojom::PreferencesServiceFactoryPtr pref_factory_ptr;
297 // Can be null in tests. 297 // Can be null in tests.
298 if (!delegate_->GetShellConnector()) 298 if (!delegate_->GetShellConnector())
299 return; 299 return;
300 delegate_->GetShellConnector()->BindInterface(prefs::mojom::kServiceName, 300 delegate_->GetShellConnector()->BindInterface(prefs::mojom::kServiceName,
301 &pref_factory_ptr); 301 &pref_factory_ptr);
302 pref_store_ = new preferences::PrefObserverStore(std::move(pref_factory_ptr)); 302 pref_store_ = new preferences::PrefClientStore(std::move(pref_factory_ptr));
303 } 303 }
304 304
305 RootWindowController* WmShell::GetPrimaryRootWindowController() { 305 RootWindowController* WmShell::GetPrimaryRootWindowController() {
306 return GetPrimaryRootWindow()->GetRootWindowController(); 306 return GetPrimaryRootWindow()->GetRootWindowController();
307 } 307 }
308 308
309 WmWindow* WmShell::GetRootWindowForNewWindows() { 309 WmWindow* WmShell::GetRootWindowForNewWindows() {
310 if (scoped_root_window_for_new_windows_) 310 if (scoped_root_window_for_new_windows_)
311 return scoped_root_window_for_new_windows_; 311 return scoped_root_window_for_new_windows_;
312 return root_window_for_new_windows_; 312 return root_window_for_new_windows_;
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 455
456 void WmShell::OnAttemptToReactivateWindow(aura::Window* request_active, 456 void WmShell::OnAttemptToReactivateWindow(aura::Window* request_active,
457 aura::Window* actual_active) { 457 aura::Window* actual_active) {
458 for (auto& observer : activation_observers_) { 458 for (auto& observer : activation_observers_) {
459 observer.OnAttemptToReactivateWindow(WmWindow::Get(request_active), 459 observer.OnAttemptToReactivateWindow(WmWindow::Get(request_active),
460 WmWindow::Get(actual_active)); 460 WmWindow::Get(actual_active));
461 } 461 }
462 } 462 }
463 463
464 } // namespace ash 464 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/wm_shell.h ('k') | chrome/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698