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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 #include "ash/system/chromeos/brightness/brightness_controller_chromeos.h" | 133 #include "ash/system/chromeos/brightness/brightness_controller_chromeos.h" |
134 #include "ash/system/chromeos/power/power_event_observer.h" | 134 #include "ash/system/chromeos/power/power_event_observer.h" |
135 #include "ash/system/chromeos/power/power_status.h" | 135 #include "ash/system/chromeos/power/power_status.h" |
136 #include "ash/system/chromeos/power/video_activity_notifier.h" | 136 #include "ash/system/chromeos/power/video_activity_notifier.h" |
137 #include "ash/system/chromeos/session/last_window_closed_logout_reminder.h" | 137 #include "ash/system/chromeos/session/last_window_closed_logout_reminder.h" |
138 #include "ash/system/chromeos/session/logout_confirmation_controller.h" | 138 #include "ash/system/chromeos/session/logout_confirmation_controller.h" |
139 #include "ash/touch/touch_transformer_controller.h" | 139 #include "ash/touch/touch_transformer_controller.h" |
140 #include "ash/virtual_keyboard_controller.h" | 140 #include "ash/virtual_keyboard_controller.h" |
141 #include "base/bind_helpers.h" | 141 #include "base/bind_helpers.h" |
142 #include "base/sys_info.h" | 142 #include "base/sys_info.h" |
| 143 #include "chromeos/audio/audio_a11y_controller.h" |
143 #include "chromeos/dbus/dbus_thread_manager.h" | 144 #include "chromeos/dbus/dbus_thread_manager.h" |
144 #include "ui/chromeos/user_activity_power_manager_notifier.h" | 145 #include "ui/chromeos/user_activity_power_manager_notifier.h" |
145 #include "ui/display/chromeos/display_configurator.h" | 146 #include "ui/display/chromeos/display_configurator.h" |
146 #endif // defined(OS_CHROMEOS) | 147 #endif // defined(OS_CHROMEOS) |
147 | 148 |
148 namespace ash { | 149 namespace ash { |
149 | 150 |
150 namespace { | 151 namespace { |
151 | 152 |
152 using aura::Window; | 153 using aura::Window; |
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
810 resolution_notification_controller_.reset(); | 811 resolution_notification_controller_.reset(); |
811 #endif | 812 #endif |
812 desktop_background_controller_.reset(); | 813 desktop_background_controller_.reset(); |
813 partial_screenshot_controller_.reset(); | 814 partial_screenshot_controller_.reset(); |
814 mouse_cursor_filter_.reset(); | 815 mouse_cursor_filter_.reset(); |
815 | 816 |
816 #if defined(OS_CHROMEOS) | 817 #if defined(OS_CHROMEOS) |
817 touch_transformer_controller_.reset(); | 818 touch_transformer_controller_.reset(); |
818 #endif // defined(OS_CHROMEOS) | 819 #endif // defined(OS_CHROMEOS) |
819 | 820 |
| 821 #if defined(OS_CHROMEOS) |
| 822 audio_a11y_controller_.reset(); |
| 823 #endif // defined(OS_CHROMEOS) |
| 824 |
820 // This also deletes all RootWindows. Note that we invoke Shutdown() on | 825 // This also deletes all RootWindows. Note that we invoke Shutdown() on |
821 // WindowTreeHostManager before resetting |window_tree_host_manager_|, since | 826 // WindowTreeHostManager before resetting |window_tree_host_manager_|, since |
822 // destruction | 827 // destruction |
823 // of its owned RootWindowControllers relies on the value. | 828 // of its owned RootWindowControllers relies on the value. |
824 display_manager_->CreateScreenForShutdown(); | 829 display_manager_->CreateScreenForShutdown(); |
825 display_configuration_controller_.reset(); | 830 display_configuration_controller_.reset(); |
826 window_tree_host_manager_->Shutdown(); | 831 window_tree_host_manager_->Shutdown(); |
827 window_tree_host_manager_.reset(); | 832 window_tree_host_manager_.reset(); |
828 screen_position_controller_.reset(); | 833 screen_position_controller_.reset(); |
829 accessibility_delegate_.reset(); | 834 accessibility_delegate_.reset(); |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1086 : init_params.keyboard_factory.Run(); | 1091 : init_params.keyboard_factory.Run(); |
1087 | 1092 |
1088 window_tree_host_manager_->InitHosts(); | 1093 window_tree_host_manager_->InitHosts(); |
1089 | 1094 |
1090 #if defined(OS_CHROMEOS) | 1095 #if defined(OS_CHROMEOS) |
1091 // Needs to be created after InitDisplays() since it may cause the virtual | 1096 // Needs to be created after InitDisplays() since it may cause the virtual |
1092 // keyboard to be deployed. | 1097 // keyboard to be deployed. |
1093 virtual_keyboard_controller_.reset(new VirtualKeyboardController); | 1098 virtual_keyboard_controller_.reset(new VirtualKeyboardController); |
1094 #endif // defined(OS_CHROMEOS) | 1099 #endif // defined(OS_CHROMEOS) |
1095 | 1100 |
| 1101 #if defined(OS_CHROMEOS) |
| 1102 audio_a11y_controller_.reset(new chromeos::AudioA11yController); |
| 1103 #endif // defined(OS_CHROMEOS) |
| 1104 |
1096 // It needs to be created after RootWindowController has been created | 1105 // It needs to be created after RootWindowController has been created |
1097 // (which calls OnWindowResized has been called, otherwise the | 1106 // (which calls OnWindowResized has been called, otherwise the |
1098 // widget will not paint when restoring after a browser crash. Also it needs | 1107 // widget will not paint when restoring after a browser crash. Also it needs |
1099 // to be created after InitSecondaryDisplays() to initialize the wallpapers in | 1108 // to be created after InitSecondaryDisplays() to initialize the wallpapers in |
1100 // the correct size. | 1109 // the correct size. |
1101 user_wallpaper_delegate_->InitializeWallpaper(); | 1110 user_wallpaper_delegate_->InitializeWallpaper(); |
1102 | 1111 |
1103 if (cursor_manager_) { | 1112 if (cursor_manager_) { |
1104 if (initially_hide_cursor_) | 1113 if (initially_hide_cursor_) |
1105 cursor_manager_->HideCursor(); | 1114 cursor_manager_->HideCursor(); |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1215 | 1224 |
1216 void Shell::OnWindowActivated( | 1225 void Shell::OnWindowActivated( |
1217 aura::client::ActivationChangeObserver::ActivationReason reason, | 1226 aura::client::ActivationChangeObserver::ActivationReason reason, |
1218 aura::Window* gained_active, | 1227 aura::Window* gained_active, |
1219 aura::Window* lost_active) { | 1228 aura::Window* lost_active) { |
1220 if (gained_active) | 1229 if (gained_active) |
1221 target_root_window_ = gained_active->GetRootWindow(); | 1230 target_root_window_ = gained_active->GetRootWindow(); |
1222 } | 1231 } |
1223 | 1232 |
1224 } // namespace ash | 1233 } // namespace ash |
OLD | NEW |