Chromium Code Reviews| 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 966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 977 | 977 |
| 978 lock_state_controller_ = | 978 lock_state_controller_ = |
| 979 base::MakeUnique<LockStateController>(shutdown_controller_.get()); | 979 base::MakeUnique<LockStateController>(shutdown_controller_.get()); |
| 980 power_button_controller_.reset( | 980 power_button_controller_.reset( |
| 981 new PowerButtonController(lock_state_controller_.get())); | 981 new PowerButtonController(lock_state_controller_.get())); |
| 982 // Pass the initial display state to PowerButtonController. | 982 // Pass the initial display state to PowerButtonController. |
| 983 power_button_controller_->OnDisplayModeChanged( | 983 power_button_controller_->OnDisplayModeChanged( |
| 984 display_configurator_->cached_displays()); | 984 display_configurator_->cached_displays()); |
| 985 | 985 |
| 986 // The connector is unavailable in some tests. | 986 // The connector is unavailable in some tests. |
| 987 if (config == Config::MASH && shell_delegate_->GetShellConnector()) { | 987 if ((config == Config::MASH || config == Config::MUS) && |
|
Daniel Erat
2017/05/04 23:06:53
would you recommend != Config::CLASSIC here? i'm j
sadrul
2017/05/04 23:09:48
Maybe we should use aura::Env::Mode::MUS for this
Daniel Erat
2017/05/04 23:58:00
sure, that seems even better. thanks!
| |
| 988 shell_delegate_->GetShellConnector()) { | |
| 988 ui::mojom::UserActivityMonitorPtr user_activity_monitor; | 989 ui::mojom::UserActivityMonitorPtr user_activity_monitor; |
| 989 shell_delegate_->GetShellConnector()->BindInterface(ui::mojom::kServiceName, | 990 shell_delegate_->GetShellConnector()->BindInterface(ui::mojom::kServiceName, |
| 990 &user_activity_monitor); | 991 &user_activity_monitor); |
| 991 user_activity_forwarder_ = base::MakeUnique<aura::UserActivityForwarder>( | 992 user_activity_forwarder_ = base::MakeUnique<aura::UserActivityForwarder>( |
| 992 std::move(user_activity_monitor), user_activity_detector_.get()); | 993 std::move(user_activity_monitor), user_activity_detector_.get()); |
| 993 } | 994 } |
| 994 | 995 |
| 995 drag_drop_controller_.reset(new DragDropController); | 996 drag_drop_controller_.reset(new DragDropController); |
| 996 // |screenshot_controller_| needs to be created (and prepended as a | 997 // |screenshot_controller_| needs to be created (and prepended as a |
| 997 // pre-target handler) at this point, because |mouse_cursor_filter_| needs to | 998 // pre-target handler) at this point, because |mouse_cursor_filter_| needs to |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1242 void Shell::OnPrefServiceInitialized( | 1243 void Shell::OnPrefServiceInitialized( |
| 1243 std::unique_ptr<::PrefService> pref_service) { | 1244 std::unique_ptr<::PrefService> pref_service) { |
| 1244 if (!instance_) | 1245 if (!instance_) |
| 1245 return; | 1246 return; |
| 1246 // |pref_service_| is null if can't connect to Chrome (as happens when | 1247 // |pref_service_| is null if can't connect to Chrome (as happens when |
| 1247 // running mash outside of chrome --mash and chrome isn't built). | 1248 // running mash outside of chrome --mash and chrome isn't built). |
| 1248 pref_service_ = std::move(pref_service); | 1249 pref_service_ = std::move(pref_service); |
| 1249 } | 1250 } |
| 1250 | 1251 |
| 1251 } // namespace ash | 1252 } // namespace ash |
| OLD | NEW |