| 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/app_list/app_list_delegate_impl.h" | 17 #include "ash/app_list/app_list_delegate_impl.h" |
| 18 #include "ash/ash_constants.h" | 18 #include "ash/ash_constants.h" |
| 19 #include "ash/ash_switches.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" |
| 27 #include "ash/display/display_error_observer_chromeos.h" | 28 #include "ash/display/display_error_observer_chromeos.h" |
| 28 #include "ash/display/event_transformation_handler.h" | 29 #include "ash/display/event_transformation_handler.h" |
| (...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 928 } | 929 } |
| 929 | 930 |
| 930 if (cursor_manager_) { | 931 if (cursor_manager_) { |
| 931 cursor_manager_->SetDisplay( | 932 cursor_manager_->SetDisplay( |
| 932 display::Screen::GetScreen()->GetPrimaryDisplay()); | 933 display::Screen::GetScreen()->GetPrimaryDisplay()); |
| 933 } | 934 } |
| 934 | 935 |
| 935 accelerator_controller_ = shell_port_->CreateAcceleratorController(); | 936 accelerator_controller_ = shell_port_->CreateAcceleratorController(); |
| 936 maximize_mode_controller_ = base::MakeUnique<MaximizeModeController>(); | 937 maximize_mode_controller_ = base::MakeUnique<MaximizeModeController>(); |
| 937 | 938 |
| 938 if (config == Config::CLASSIC || config == Config::MUS) { | 939 if (config == Config::CLASSIC || |
| 940 (config == Config::MUS && |
| 941 !base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 942 switches::kUseServicifiedIME))) { |
| 939 // Not applicable to mash as events are already routed to InputMethod first. | 943 // Not applicable to mash as events are already routed to InputMethod first. |
| 940 AddPreTargetHandler( | 944 AddPreTargetHandler( |
| 941 window_tree_host_manager_->input_method_event_handler()); | 945 window_tree_host_manager_->input_method_event_handler()); |
| 942 } | 946 } |
| 943 | 947 |
| 944 magnifier_key_scroll_handler_ = MagnifierKeyScroller::CreateHandler(); | 948 magnifier_key_scroll_handler_ = MagnifierKeyScroller::CreateHandler(); |
| 945 AddPreTargetHandler(magnifier_key_scroll_handler_.get()); | 949 AddPreTargetHandler(magnifier_key_scroll_handler_.get()); |
| 946 speech_feedback_handler_ = SpokenFeedbackToggler::CreateHandler(); | 950 speech_feedback_handler_ = SpokenFeedbackToggler::CreateHandler(); |
| 947 AddPreTargetHandler(speech_feedback_handler_.get()); | 951 AddPreTargetHandler(speech_feedback_handler_.get()); |
| 948 | 952 |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1243 void Shell::OnPrefServiceInitialized( | 1247 void Shell::OnPrefServiceInitialized( |
| 1244 std::unique_ptr<::PrefService> pref_service) { | 1248 std::unique_ptr<::PrefService> pref_service) { |
| 1245 if (!instance_) | 1249 if (!instance_) |
| 1246 return; | 1250 return; |
| 1247 // |pref_service_| is null if can't connect to Chrome (as happens when | 1251 // |pref_service_| is null if can't connect to Chrome (as happens when |
| 1248 // running mash outside of chrome --mash and chrome isn't built). | 1252 // running mash outside of chrome --mash and chrome isn't built). |
| 1249 pref_service_ = std::move(pref_service); | 1253 pref_service_ = std::move(pref_service); |
| 1250 } | 1254 } |
| 1251 | 1255 |
| 1252 } // namespace ash | 1256 } // namespace ash |
| OLD | NEW |