| 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 939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 950 std::unique_ptr<::wm::AcceleratorDelegate>(new AcceleratorDelegate), | 950 std::unique_ptr<::wm::AcceleratorDelegate>(new AcceleratorDelegate), |
| 951 accelerator_controller_->accelerator_history())); | 951 accelerator_controller_->accelerator_history())); |
| 952 AddPreTargetHandler(accelerator_filter_.get()); | 952 AddPreTargetHandler(accelerator_filter_.get()); |
| 953 | 953 |
| 954 event_transformation_handler_.reset(new EventTransformationHandler); | 954 event_transformation_handler_.reset(new EventTransformationHandler); |
| 955 AddPreTargetHandler(event_transformation_handler_.get()); | 955 AddPreTargetHandler(event_transformation_handler_.get()); |
| 956 | 956 |
| 957 toplevel_window_event_handler_ = | 957 toplevel_window_event_handler_ = |
| 958 base::MakeUnique<ToplevelWindowEventHandler>(); | 958 base::MakeUnique<ToplevelWindowEventHandler>(); |
| 959 | 959 |
| 960 if (config != Config::MASH) { | 960 // TODO: get working in Config::MUS. This uses InputDeviceManager, which is |
| 961 // not created in mus. http://crbug.com/712290. |
| 962 if (config == Config::CLASSIC) { |
| 961 system_gesture_filter_.reset(new SystemGestureEventFilter); | 963 system_gesture_filter_.reset(new SystemGestureEventFilter); |
| 962 AddPreTargetHandler(system_gesture_filter_.get()); | 964 AddPreTargetHandler(system_gesture_filter_.get()); |
| 963 } | 965 } |
| 964 | 966 |
| 965 sticky_keys_controller_.reset(new StickyKeysController); | 967 sticky_keys_controller_.reset(new StickyKeysController); |
| 966 screen_pinning_controller_ = base::MakeUnique<ScreenPinningController>(); | 968 screen_pinning_controller_ = base::MakeUnique<ScreenPinningController>(); |
| 967 | 969 |
| 968 lock_state_controller_ = | 970 lock_state_controller_ = |
| 969 base::MakeUnique<LockStateController>(shutdown_controller_.get()); | 971 base::MakeUnique<LockStateController>(shutdown_controller_.get()); |
| 970 power_button_controller_.reset( | 972 power_button_controller_.reset( |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1044 touch_transformer_controller_.reset(new AshTouchTransformController( | 1046 touch_transformer_controller_.reset(new AshTouchTransformController( |
| 1045 display_configurator_.get(), display_manager_.get())); | 1047 display_configurator_.get(), display_manager_.get())); |
| 1046 } | 1048 } |
| 1047 | 1049 |
| 1048 keyboard_ui_ = shell_port_->CreateKeyboardUI(); | 1050 keyboard_ui_ = shell_port_->CreateKeyboardUI(); |
| 1049 | 1051 |
| 1050 shell_port_->InitHosts(init_params); | 1052 shell_port_->InitHosts(init_params); |
| 1051 | 1053 |
| 1052 // Needs to be created after InitDisplays() since it may cause the virtual | 1054 // Needs to be created after InitDisplays() since it may cause the virtual |
| 1053 // keyboard to be deployed. | 1055 // keyboard to be deployed. |
| 1054 if (config != Config::MASH) | 1056 // TODO: get working in Config::MUS. This uses InputDeviceManager, which is |
| 1057 // not created in mus. http://crbug.com/712290. |
| 1058 if (config == Config::CLASSIC) |
| 1055 virtual_keyboard_controller_.reset(new VirtualKeyboardController); | 1059 virtual_keyboard_controller_.reset(new VirtualKeyboardController); |
| 1056 | 1060 |
| 1057 audio_a11y_controller_.reset(new chromeos::AudioA11yController); | 1061 audio_a11y_controller_.reset(new chromeos::AudioA11yController); |
| 1058 | 1062 |
| 1059 // Initialize the wallpaper after the RootWindowController has been created, | 1063 // Initialize the wallpaper after the RootWindowController has been created, |
| 1060 // otherwise the widget will not paint when restoring after a browser crash. | 1064 // otherwise the widget will not paint when restoring after a browser crash. |
| 1061 // Also, initialize after display initialization to ensure correct sizing. | 1065 // Also, initialize after display initialization to ensure correct sizing. |
| 1062 wallpaper_delegate_->InitializeWallpaper(); | 1066 wallpaper_delegate_->InitializeWallpaper(); |
| 1063 | 1067 |
| 1064 if (cursor_manager_) { | 1068 if (cursor_manager_) { |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1254 void Shell::OnPrefServiceInitialized( | 1258 void Shell::OnPrefServiceInitialized( |
| 1255 std::unique_ptr<::PrefService> pref_service) { | 1259 std::unique_ptr<::PrefService> pref_service) { |
| 1256 if (!instance_) | 1260 if (!instance_) |
| 1257 return; | 1261 return; |
| 1258 // |pref_service_| is null if can't connect to Chrome (as happens when | 1262 // |pref_service_| is null if can't connect to Chrome (as happens when |
| 1259 // running mash outside of chrome --mash and chrome isn't built). | 1263 // running mash outside of chrome --mash and chrome isn't built). |
| 1260 pref_service_ = std::move(pref_service); | 1264 pref_service_ = std::move(pref_service); |
| 1261 } | 1265 } |
| 1262 | 1266 |
| 1263 } // namespace ash | 1267 } // namespace ash |
| OLD | NEW |