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

Side by Side Diff: ash/shell.cc

Issue 2827193004: Make PrefService available in *ash (Closed)
Patch Set: Adding NOTREACHED() comment. Created 3 years, 8 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/shell.h ('k') | ash/shell/shell_delegate_impl.h » ('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 (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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 369
370 aura::client::ActivationClient* Shell::activation_client() { 370 aura::client::ActivationClient* Shell::activation_client() {
371 return focus_controller_.get(); 371 return focus_controller_.get();
372 } 372 }
373 373
374 void Shell::UpdateShelfVisibility() { 374 void Shell::UpdateShelfVisibility() {
375 for (WmWindow* root : shell_port_->GetAllRootWindows()) 375 for (WmWindow* root : shell_port_->GetAllRootWindows())
376 root->GetRootWindowController()->GetShelf()->UpdateVisibilityState(); 376 root->GetRootWindowController()->GetShelf()->UpdateVisibilityState();
377 } 377 }
378 378
379 PrefService* Shell::GetActiveUserPrefService() const {
380 if (shell_port_->GetAshConfig() == Config::MASH)
381 return pref_service_.get();
382
383 return shell_delegate_->GetActiveUserPrefService();
384 }
385
379 WebNotificationTray* Shell::GetWebNotificationTray() { 386 WebNotificationTray* Shell::GetWebNotificationTray() {
380 return GetPrimaryRootWindowController() 387 return GetPrimaryRootWindowController()
381 ->GetStatusAreaWidget() 388 ->GetStatusAreaWidget()
382 ->web_notification_tray(); 389 ->web_notification_tray();
383 } 390 }
384 391
385 bool Shell::HasPrimaryStatusArea() { 392 bool Shell::HasPrimaryStatusArea() {
386 return !!GetPrimaryRootWindowController()->GetStatusAreaWidget(); 393 return !!GetPrimaryRootWindowController()->GetStatusAreaWidget();
387 } 394 }
388 395
(...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after
1232 void Shell::OnPrefServiceInitialized( 1239 void Shell::OnPrefServiceInitialized(
1233 std::unique_ptr<::PrefService> pref_service) { 1240 std::unique_ptr<::PrefService> pref_service) {
1234 if (!instance_) 1241 if (!instance_)
1235 return; 1242 return;
1236 // |pref_service_| is null if can't connect to Chrome (as happens when 1243 // |pref_service_| is null if can't connect to Chrome (as happens when
1237 // running mash outside of chrome --mash and chrome isn't built). 1244 // running mash outside of chrome --mash and chrome isn't built).
1238 pref_service_ = std::move(pref_service); 1245 pref_service_ = std::move(pref_service);
1239 } 1246 }
1240 1247
1241 } // namespace ash 1248 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell.h ('k') | ash/shell/shell_delegate_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698