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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |