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 773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
784 | 784 |
785 void Shell::Init(const ShellInitParams& init_params) { | 785 void Shell::Init(const ShellInitParams& init_params) { |
786 const bool is_mash = wm_shell_->IsRunningInMash(); | 786 const bool is_mash = wm_shell_->IsRunningInMash(); |
787 const Config config = wm_shell_->GetAshConfig(); | 787 const Config config = wm_shell_->GetAshConfig(); |
788 | 788 |
789 blocking_pool_ = init_params.blocking_pool; | 789 blocking_pool_ = init_params.blocking_pool; |
790 | 790 |
791 wallpaper_delegate_ = shell_delegate_->CreateWallpaperDelegate(); | 791 wallpaper_delegate_ = shell_delegate_->CreateWallpaperDelegate(); |
792 | 792 |
793 // Can be null in tests. | 793 // Can be null in tests. |
794 // TODO(jonross): reenable once the cause of crbug.com/707321 is determined. | |
795 /* | |
796 if (wm_shell_->IsRunningInMash() && shell_delegate_->GetShellConnector()) { | 794 if (wm_shell_->IsRunningInMash() && shell_delegate_->GetShellConnector()) { |
797 prefs::ConnectToPrefService( | 795 prefs::ConnectToPrefService( |
798 shell_delegate_->GetShellConnector(), | 796 shell_delegate_->GetShellConnector(), |
799 make_scoped_refptr(new PrefRegistrySimple()), | 797 make_scoped_refptr(new PrefRegistrySimple()), |
800 std::vector<PrefValueStore::PrefStoreType>(), | 798 std::vector<PrefValueStore::PrefStoreType>(), |
801 base::Bind(&Shell::OnPrefServiceInitialized, base::Unretained(this)), | 799 base::Bind(&Shell::OnPrefServiceInitialized, base::Unretained(this)), |
802 prefs::mojom::kForwarderServiceName); | 800 prefs::mojom::kForwarderServiceName); |
803 }*/ | 801 } |
804 | 802 |
805 // Some delegates access WmShell during their construction. Create them here | 803 // Some delegates access WmShell during their construction. Create them here |
806 // instead of the WmShell constructor. | 804 // instead of the WmShell constructor. |
807 accessibility_delegate_.reset(shell_delegate_->CreateAccessibilityDelegate()); | 805 accessibility_delegate_.reset(shell_delegate_->CreateAccessibilityDelegate()); |
808 palette_delegate_ = shell_delegate_->CreatePaletteDelegate(); | 806 palette_delegate_ = shell_delegate_->CreatePaletteDelegate(); |
809 toast_manager_ = base::MakeUnique<ToastManager>(); | 807 toast_manager_ = base::MakeUnique<ToastManager>(); |
810 | 808 |
811 // Install the custom factory early on so that views::FocusManagers for Tray, | 809 // Install the custom factory early on so that views::FocusManagers for Tray, |
812 // Shelf, and WallPaper could be created by the factory. | 810 // Shelf, and WallPaper could be created by the factory. |
813 views::FocusManagerFactory::Install(new AshFocusManagerFactory); | 811 views::FocusManagerFactory::Install(new AshFocusManagerFactory); |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1253 | 1251 |
1254 void Shell::OnPrefServiceInitialized( | 1252 void Shell::OnPrefServiceInitialized( |
1255 std::unique_ptr<::PrefService> pref_service) { | 1253 std::unique_ptr<::PrefService> pref_service) { |
1256 if (!instance_) | 1254 if (!instance_) |
1257 return; | 1255 return; |
1258 DCHECK(pref_service); | 1256 DCHECK(pref_service); |
1259 pref_service_ = std::move(pref_service); | 1257 pref_service_ = std::move(pref_service); |
1260 } | 1258 } |
1261 | 1259 |
1262 } // namespace ash | 1260 } // namespace ash |
OLD | NEW |