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 | 9 |
10 #include "ash/accelerators/accelerator_controller.h" | 10 #include "ash/accelerators/accelerator_controller.h" |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 #include "ash/display/display_change_observer_chromeos.h" | 122 #include "ash/display/display_change_observer_chromeos.h" |
123 #include "ash/display/display_error_observer_chromeos.h" | 123 #include "ash/display/display_error_observer_chromeos.h" |
124 #include "ash/display/output_configurator_animation.h" | 124 #include "ash/display/output_configurator_animation.h" |
125 #include "ash/display/projecting_observer_chromeos.h" | 125 #include "ash/display/projecting_observer_chromeos.h" |
126 #include "base/message_loop/message_pump_x11.h" | 126 #include "base/message_loop/message_pump_x11.h" |
127 #include "base/sys_info.h" | 127 #include "base/sys_info.h" |
128 #include "chromeos/display/output_configurator.h" | 128 #include "chromeos/display/output_configurator.h" |
129 #endif // defined(USE_X11) | 129 #endif // defined(USE_X11) |
130 #include "ash/display/resolution_notification_controller.h" | 130 #include "ash/display/resolution_notification_controller.h" |
131 #include "ash/sticky_keys/sticky_keys_controller.h" | 131 #include "ash/sticky_keys/sticky_keys_controller.h" |
| 132 #include "ash/system/chromeos/bluetooth/bluetooth_notification_controller.h" |
132 #include "ash/system/chromeos/brightness/brightness_controller_chromeos.h" | 133 #include "ash/system/chromeos/brightness/brightness_controller_chromeos.h" |
133 #include "ash/system/chromeos/power/power_event_observer.h" | 134 #include "ash/system/chromeos/power/power_event_observer.h" |
134 #include "ash/system/chromeos/power/power_status.h" | 135 #include "ash/system/chromeos/power/power_status.h" |
135 #include "ash/system/chromeos/power/user_activity_notifier.h" | 136 #include "ash/system/chromeos/power/user_activity_notifier.h" |
136 #include "ash/system/chromeos/power/video_activity_notifier.h" | 137 #include "ash/system/chromeos/power/video_activity_notifier.h" |
137 #endif // defined(OS_CHROMEOS) | 138 #endif // defined(OS_CHROMEOS) |
138 | 139 |
139 namespace ash { | 140 namespace ash { |
140 | 141 |
141 namespace { | 142 namespace { |
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
979 // Set accelerator controller delegates. | 980 // Set accelerator controller delegates. |
980 accelerator_controller_->SetBrightnessControlDelegate( | 981 accelerator_controller_->SetBrightnessControlDelegate( |
981 scoped_ptr<ash::BrightnessControlDelegate>( | 982 scoped_ptr<ash::BrightnessControlDelegate>( |
982 new ash::system::BrightnessControllerChromeos).Pass()); | 983 new ash::system::BrightnessControllerChromeos).Pass()); |
983 | 984 |
984 power_event_observer_.reset(new internal::PowerEventObserver()); | 985 power_event_observer_.reset(new internal::PowerEventObserver()); |
985 user_activity_notifier_.reset( | 986 user_activity_notifier_.reset( |
986 new internal::UserActivityNotifier(user_activity_detector_.get())); | 987 new internal::UserActivityNotifier(user_activity_detector_.get())); |
987 video_activity_notifier_.reset( | 988 video_activity_notifier_.reset( |
988 new internal::VideoActivityNotifier(video_detector_.get())); | 989 new internal::VideoActivityNotifier(video_detector_.get())); |
| 990 bluetooth_notification_controller_.reset( |
| 991 new internal::BluetoothNotificationController); |
989 #endif | 992 #endif |
990 | 993 |
991 weak_display_manager_factory_.reset( | 994 weak_display_manager_factory_.reset( |
992 new base::WeakPtrFactory<internal::DisplayManager>( | 995 new base::WeakPtrFactory<internal::DisplayManager>( |
993 display_manager_.get())); | 996 display_manager_.get())); |
994 // The compositor thread and main message loop have to be running in | 997 // The compositor thread and main message loop have to be running in |
995 // order to create mirror window. Run it after the main message loop | 998 // order to create mirror window. Run it after the main message loop |
996 // is started. | 999 // is started. |
997 base::MessageLoopForUI::current()->PostTask( | 1000 base::MessageLoopForUI::current()->PostTask( |
998 FROM_HERE, | 1001 FROM_HERE, |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1087 //////////////////////////////////////////////////////////////////////////////// | 1090 //////////////////////////////////////////////////////////////////////////////// |
1088 // Shell, aura::client::ActivationChangeObserver implementation: | 1091 // Shell, aura::client::ActivationChangeObserver implementation: |
1089 | 1092 |
1090 void Shell::OnWindowActivated(aura::Window* gained_active, | 1093 void Shell::OnWindowActivated(aura::Window* gained_active, |
1091 aura::Window* lost_active) { | 1094 aura::Window* lost_active) { |
1092 if (gained_active) | 1095 if (gained_active) |
1093 target_root_window_ = gained_active->GetRootWindow(); | 1096 target_root_window_ = gained_active->GetRootWindow(); |
1094 } | 1097 } |
1095 | 1098 |
1096 } // namespace ash | 1099 } // namespace ash |
OLD | NEW |