| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 #include "ash/system/chromeos/brightness/brightness_controller_chromeos.h" | 132 #include "ash/system/chromeos/brightness/brightness_controller_chromeos.h" |
| 133 #include "ash/system/chromeos/power/power_event_observer.h" | 133 #include "ash/system/chromeos/power/power_event_observer.h" |
| 134 #include "ash/system/chromeos/power/power_status.h" | 134 #include "ash/system/chromeos/power/power_status.h" |
| 135 #include "ash/system/chromeos/power/video_activity_notifier.h" | 135 #include "ash/system/chromeos/power/video_activity_notifier.h" |
| 136 #include "ash/system/chromeos/session/last_window_closed_logout_reminder.h" | 136 #include "ash/system/chromeos/session/last_window_closed_logout_reminder.h" |
| 137 #include "ash/system/chromeos/session/logout_confirmation_controller.h" | 137 #include "ash/system/chromeos/session/logout_confirmation_controller.h" |
| 138 #include "ash/touch/touch_transformer_controller.h" | 138 #include "ash/touch/touch_transformer_controller.h" |
| 139 #include "ash/virtual_keyboard_controller.h" | 139 #include "ash/virtual_keyboard_controller.h" |
| 140 #include "base/bind_helpers.h" | 140 #include "base/bind_helpers.h" |
| 141 #include "base/sys_info.h" | 141 #include "base/sys_info.h" |
| 142 #include "chromeos/audio/audio_a11y_controller.h" |
| 142 #include "chromeos/dbus/dbus_thread_manager.h" | 143 #include "chromeos/dbus/dbus_thread_manager.h" |
| 143 #include "ui/chromeos/user_activity_power_manager_notifier.h" | 144 #include "ui/chromeos/user_activity_power_manager_notifier.h" |
| 144 #include "ui/display/chromeos/display_configurator.h" | 145 #include "ui/display/chromeos/display_configurator.h" |
| 145 #endif // defined(OS_CHROMEOS) | 146 #endif // defined(OS_CHROMEOS) |
| 146 | 147 |
| 147 namespace ash { | 148 namespace ash { |
| 148 | 149 |
| 149 namespace { | 150 namespace { |
| 150 | 151 |
| 151 using aura::Window; | 152 using aura::Window; |
| (...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 754 | 755 |
| 755 #if defined(OS_CHROMEOS) | 756 #if defined(OS_CHROMEOS) |
| 756 // VideoActivityNotifier must be deleted before |video_detector_| is | 757 // VideoActivityNotifier must be deleted before |video_detector_| is |
| 757 // deleted because it's observing video activity through | 758 // deleted because it's observing video activity through |
| 758 // VideoDetectorObserver interface. | 759 // VideoDetectorObserver interface. |
| 759 video_activity_notifier_.reset(); | 760 video_activity_notifier_.reset(); |
| 760 #endif // defined(OS_CHROMEOS) | 761 #endif // defined(OS_CHROMEOS) |
| 761 video_detector_.reset(); | 762 video_detector_.reset(); |
| 762 high_contrast_controller_.reset(); | 763 high_contrast_controller_.reset(); |
| 763 | 764 |
| 765 #if defined(OS_CHROMEOS) |
| 766 audio_a11y_controller_.reset(); |
| 767 #endif // defined(OS_CHROMEOS) |
| 768 |
| 764 shadow_controller_.reset(); | 769 shadow_controller_.reset(); |
| 765 resize_shadow_controller_.reset(); | 770 resize_shadow_controller_.reset(); |
| 766 | 771 |
| 767 window_cycle_controller_.reset(); | 772 window_cycle_controller_.reset(); |
| 768 window_selector_controller_.reset(); | 773 window_selector_controller_.reset(); |
| 769 | 774 |
| 770 // |shelf_window_watcher_| has a weak pointer to |shelf_Model_| | 775 // |shelf_window_watcher_| has a weak pointer to |shelf_Model_| |
| 771 // and has window observers. | 776 // and has window observers. |
| 772 shelf_window_watcher_.reset(); | 777 shelf_window_watcher_.reset(); |
| 773 | 778 |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1084 : init_params.keyboard_factory.Run(); | 1089 : init_params.keyboard_factory.Run(); |
| 1085 | 1090 |
| 1086 window_tree_host_manager_->InitHosts(); | 1091 window_tree_host_manager_->InitHosts(); |
| 1087 | 1092 |
| 1088 #if defined(OS_CHROMEOS) | 1093 #if defined(OS_CHROMEOS) |
| 1089 // Needs to be created after InitDisplays() since it may cause the virtual | 1094 // Needs to be created after InitDisplays() since it may cause the virtual |
| 1090 // keyboard to be deployed. | 1095 // keyboard to be deployed. |
| 1091 virtual_keyboard_controller_.reset(new VirtualKeyboardController); | 1096 virtual_keyboard_controller_.reset(new VirtualKeyboardController); |
| 1092 #endif // defined(OS_CHROMEOS) | 1097 #endif // defined(OS_CHROMEOS) |
| 1093 | 1098 |
| 1099 #if defined(OS_CHROMEOS) |
| 1100 audio_a11y_controller_.reset(new chromeos::AudioA11yController); |
| 1101 #endif // defined(OS_CHROMEOS) |
| 1102 |
| 1094 // It needs to be created after RootWindowController has been created | 1103 // It needs to be created after RootWindowController has been created |
| 1095 // (which calls OnWindowResized has been called, otherwise the | 1104 // (which calls OnWindowResized has been called, otherwise the |
| 1096 // widget will not paint when restoring after a browser crash. Also it needs | 1105 // widget will not paint when restoring after a browser crash. Also it needs |
| 1097 // to be created after InitSecondaryDisplays() to initialize the wallpapers in | 1106 // to be created after InitSecondaryDisplays() to initialize the wallpapers in |
| 1098 // the correct size. | 1107 // the correct size. |
| 1099 user_wallpaper_delegate_->InitializeWallpaper(); | 1108 user_wallpaper_delegate_->InitializeWallpaper(); |
| 1100 | 1109 |
| 1101 if (cursor_manager_) { | 1110 if (cursor_manager_) { |
| 1102 if (initially_hide_cursor_) | 1111 if (initially_hide_cursor_) |
| 1103 cursor_manager_->HideCursor(); | 1112 cursor_manager_->HideCursor(); |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1213 | 1222 |
| 1214 void Shell::OnWindowActivated( | 1223 void Shell::OnWindowActivated( |
| 1215 aura::client::ActivationChangeObserver::ActivationReason reason, | 1224 aura::client::ActivationChangeObserver::ActivationReason reason, |
| 1216 aura::Window* gained_active, | 1225 aura::Window* gained_active, |
| 1217 aura::Window* lost_active) { | 1226 aura::Window* lost_active) { |
| 1218 if (gained_active) | 1227 if (gained_active) |
| 1219 target_root_window_ = gained_active->GetRootWindow(); | 1228 target_root_window_ = gained_active->GetRootWindow(); |
| 1220 } | 1229 } |
| 1221 | 1230 |
| 1222 } // namespace ash | 1231 } // namespace ash |
| OLD | NEW |