| 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 |
| 11 #include "ash/accelerators/accelerator_controller.h" | 11 #include "ash/accelerators/accelerator_controller.h" |
| 12 #include "ash/accelerators/accelerator_delegate.h" | 12 #include "ash/accelerators/accelerator_delegate.h" |
| 13 #include "ash/accelerators/ash_focus_manager_factory.h" | 13 #include "ash/accelerators/ash_focus_manager_factory.h" |
| 14 #include "ash/accelerators/magnifier_key_scroller.h" | 14 #include "ash/accelerators/magnifier_key_scroller.h" |
| 15 #include "ash/accelerators/spoken_feedback_toggler.h" | 15 #include "ash/accelerators/spoken_feedback_toggler.h" |
| 16 #include "ash/accessibility_delegate.h" | 16 #include "ash/accessibility_delegate.h" |
| 17 #include "ash/action_handler/action_handler_state_controller.h" |
| 17 #include "ash/app_list/app_list_delegate_impl.h" | 18 #include "ash/app_list/app_list_delegate_impl.h" |
| 18 #include "ash/ash_constants.h" | 19 #include "ash/ash_constants.h" |
| 19 #include "ash/aura/shell_port_classic.h" | 20 #include "ash/aura/shell_port_classic.h" |
| 20 #include "ash/autoclick/autoclick_controller.h" | 21 #include "ash/autoclick/autoclick_controller.h" |
| 21 #include "ash/cast_config_controller.h" | 22 #include "ash/cast_config_controller.h" |
| 22 #include "ash/devtools/ash_devtools_css_agent.h" | 23 #include "ash/devtools/ash_devtools_css_agent.h" |
| 23 #include "ash/devtools/ash_devtools_dom_agent.h" | 24 #include "ash/devtools/ash_devtools_dom_agent.h" |
| 24 #include "ash/display/cursor_window_controller.h" | 25 #include "ash/display/cursor_window_controller.h" |
| 25 #include "ash/display/display_color_manager_chromeos.h" | 26 #include "ash/display/display_color_manager_chromeos.h" |
| 26 #include "ash/display/display_configuration_controller.h" | 27 #include "ash/display/display_configuration_controller.h" |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 542 for (auto& observer : shell_observers_) | 543 for (auto& observer : shell_observers_) |
| 543 observer.OnShelfAutoHideBehaviorChanged(root_window); | 544 observer.OnShelfAutoHideBehaviorChanged(root_window); |
| 544 } | 545 } |
| 545 | 546 |
| 546 //////////////////////////////////////////////////////////////////////////////// | 547 //////////////////////////////////////////////////////////////////////////////// |
| 547 // Shell, private: | 548 // Shell, private: |
| 548 | 549 |
| 549 Shell::Shell(std::unique_ptr<ShellDelegate> shell_delegate, | 550 Shell::Shell(std::unique_ptr<ShellDelegate> shell_delegate, |
| 550 std::unique_ptr<ShellPort> shell_port) | 551 std::unique_ptr<ShellPort> shell_port) |
| 551 : shell_port_(std::move(shell_port)), | 552 : shell_port_(std::move(shell_port)), |
| 553 action_handler_state_controller_( |
| 554 base::MakeUnique<ActionHandlerStateController>()), |
| 552 brightness_control_delegate_( | 555 brightness_control_delegate_( |
| 553 base::MakeUnique<system::BrightnessControllerChromeos>()), | 556 base::MakeUnique<system::BrightnessControllerChromeos>()), |
| 554 cast_config_(base::MakeUnique<CastConfigController>()), | 557 cast_config_(base::MakeUnique<CastConfigController>()), |
| 555 focus_cycler_(base::MakeUnique<FocusCycler>()), | 558 focus_cycler_(base::MakeUnique<FocusCycler>()), |
| 556 immersive_context_(base::MakeUnique<ImmersiveContextAsh>()), | 559 immersive_context_(base::MakeUnique<ImmersiveContextAsh>()), |
| 557 keyboard_brightness_control_delegate_( | 560 keyboard_brightness_control_delegate_( |
| 558 base::MakeUnique<KeyboardBrightnessController>()), | 561 base::MakeUnique<KeyboardBrightnessController>()), |
| 559 locale_notification_controller_( | 562 locale_notification_controller_( |
| 560 base::MakeUnique<LocaleNotificationController>()), | 563 base::MakeUnique<LocaleNotificationController>()), |
| 561 media_controller_(base::MakeUnique<MediaController>()), | 564 media_controller_(base::MakeUnique<MediaController>()), |
| (...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1250 void Shell::OnPrefServiceInitialized( | 1253 void Shell::OnPrefServiceInitialized( |
| 1251 std::unique_ptr<::PrefService> pref_service) { | 1254 std::unique_ptr<::PrefService> pref_service) { |
| 1252 if (!instance_) | 1255 if (!instance_) |
| 1253 return; | 1256 return; |
| 1254 // |pref_service_| is null if can't connect to Chrome (as happens when | 1257 // |pref_service_| is null if can't connect to Chrome (as happens when |
| 1255 // running mash outside of chrome --mash and chrome isn't built). | 1258 // running mash outside of chrome --mash and chrome isn't built). |
| 1256 pref_service_ = std::move(pref_service); | 1259 pref_service_ = std::move(pref_service); |
| 1257 } | 1260 } |
| 1258 | 1261 |
| 1259 } // namespace ash | 1262 } // namespace ash |
| OLD | NEW |