| 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 #include "ash/shell.h" | 5 #include "ash/shell.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 792 const Config config = wm_shell_->GetConfig(); | 792 const Config config = wm_shell_->GetConfig(); |
| 793 | 793 |
| 794 blocking_pool_ = init_params.blocking_pool; | 794 blocking_pool_ = init_params.blocking_pool; |
| 795 | 795 |
| 796 wallpaper_delegate_ = shell_delegate_->CreateWallpaperDelegate(); | 796 wallpaper_delegate_ = shell_delegate_->CreateWallpaperDelegate(); |
| 797 | 797 |
| 798 // Can be null in tests. | 798 // Can be null in tests. |
| 799 if (wm_shell_->IsRunningInMash() && shell_delegate_->GetShellConnector()) { | 799 if (wm_shell_->IsRunningInMash() && shell_delegate_->GetShellConnector()) { |
| 800 prefs::ConnectToPrefService( | 800 prefs::ConnectToPrefService( |
| 801 shell_delegate_->GetShellConnector(), | 801 shell_delegate_->GetShellConnector(), |
| 802 make_scoped_refptr(new PrefRegistrySimple()), | 802 make_scoped_refptr(new PrefRegistrySimple()), {}, |
| 803 base::Bind(&Shell::OnPrefServiceInitialized, base::Unretained(this)), | 803 base::Bind(&Shell::OnPrefServiceInitialized, base::Unretained(this)), |
| 804 prefs::mojom::kForwarderServiceName); | 804 prefs::mojom::kForwarderServiceName); |
| 805 } | 805 } |
| 806 | 806 |
| 807 // Some delegates access WmShell during their construction. Create them here | 807 // Some delegates access WmShell during their construction. Create them here |
| 808 // instead of the WmShell constructor. | 808 // instead of the WmShell constructor. |
| 809 accessibility_delegate_.reset(shell_delegate_->CreateAccessibilityDelegate()); | 809 accessibility_delegate_.reset(shell_delegate_->CreateAccessibilityDelegate()); |
| 810 palette_delegate_ = shell_delegate_->CreatePaletteDelegate(); | 810 palette_delegate_ = shell_delegate_->CreatePaletteDelegate(); |
| 811 toast_manager_ = base::MakeUnique<ToastManager>(); | 811 toast_manager_ = base::MakeUnique<ToastManager>(); |
| 812 | 812 |
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1252 | 1252 |
| 1253 void Shell::OnPrefServiceInitialized( | 1253 void Shell::OnPrefServiceInitialized( |
| 1254 std::unique_ptr<::PrefService> pref_service) { | 1254 std::unique_ptr<::PrefService> pref_service) { |
| 1255 if (!instance_) | 1255 if (!instance_) |
| 1256 return; | 1256 return; |
| 1257 DCHECK(pref_service); | 1257 DCHECK(pref_service); |
| 1258 pref_service_ = std::move(pref_service); | 1258 pref_service_ = std::move(pref_service); |
| 1259 } | 1259 } |
| 1260 | 1260 |
| 1261 } // namespace ash | 1261 } // namespace ash |
| OLD | NEW |