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