| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 #include "ash/display/display_change_observer_chromeos.h" | 114 #include "ash/display/display_change_observer_chromeos.h" |
| 115 #include "ash/display/display_error_observer_chromeos.h" | 115 #include "ash/display/display_error_observer_chromeos.h" |
| 116 #include "ash/display/output_configurator_animation.h" | 116 #include "ash/display/output_configurator_animation.h" |
| 117 #include "base/message_loop/message_pump_x11.h" | 117 #include "base/message_loop/message_pump_x11.h" |
| 118 #include "base/sys_info.h" | 118 #include "base/sys_info.h" |
| 119 #include "chromeos/display/output_configurator.h" | 119 #include "chromeos/display/output_configurator.h" |
| 120 #include "content/public/browser/gpu_data_manager.h" | 120 #include "content/public/browser/gpu_data_manager.h" |
| 121 #include "gpu/config/gpu_feature_type.h" | 121 #include "gpu/config/gpu_feature_type.h" |
| 122 #endif // defined(USE_X11) | 122 #endif // defined(USE_X11) |
| 123 #include "ash/system/chromeos/brightness/brightness_controller_chromeos.h" | 123 #include "ash/system/chromeos/brightness/brightness_controller_chromeos.h" |
| 124 #include "ash/system/chromeos/power/power_event_observer.h" |
| 124 #include "ash/system/chromeos/power/power_status.h" | 125 #include "ash/system/chromeos/power/power_status.h" |
| 125 #include "ash/system/chromeos/power/suspend_observer.h" | |
| 126 #include "ash/system/chromeos/power/user_activity_notifier.h" | 126 #include "ash/system/chromeos/power/user_activity_notifier.h" |
| 127 #include "ash/system/chromeos/power/video_activity_notifier.h" | 127 #include "ash/system/chromeos/power/video_activity_notifier.h" |
| 128 #endif // defined(OS_CHROMEOS) | 128 #endif // defined(OS_CHROMEOS) |
| 129 | 129 |
| 130 namespace ash { | 130 namespace ash { |
| 131 | 131 |
| 132 namespace { | 132 namespace { |
| 133 | 133 |
| 134 using aura::Window; | 134 using aura::Window; |
| 135 using views::Widget; | 135 using views::Widget; |
| (...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 876 // Let the first mouse event show the cursor. | 876 // Let the first mouse event show the cursor. |
| 877 env_filter_->set_cursor_hidden_by_filter(true); | 877 env_filter_->set_cursor_hidden_by_filter(true); |
| 878 } | 878 } |
| 879 | 879 |
| 880 #if defined(OS_CHROMEOS) | 880 #if defined(OS_CHROMEOS) |
| 881 // Set accelerator controller delegates. | 881 // Set accelerator controller delegates. |
| 882 accelerator_controller_->SetBrightnessControlDelegate( | 882 accelerator_controller_->SetBrightnessControlDelegate( |
| 883 scoped_ptr<ash::BrightnessControlDelegate>( | 883 scoped_ptr<ash::BrightnessControlDelegate>( |
| 884 new ash::system::BrightnessControllerChromeos).Pass()); | 884 new ash::system::BrightnessControllerChromeos).Pass()); |
| 885 | 885 |
| 886 suspend_observer_.reset(new internal::SuspendObserver()); | 886 power_event_observer_.reset(new internal::PowerEventObserver()); |
| 887 user_activity_notifier_.reset( | 887 user_activity_notifier_.reset( |
| 888 new internal::UserActivityNotifier(user_activity_detector_.get())); | 888 new internal::UserActivityNotifier(user_activity_detector_.get())); |
| 889 video_activity_notifier_.reset( | 889 video_activity_notifier_.reset( |
| 890 new internal::VideoActivityNotifier(video_detector_.get())); | 890 new internal::VideoActivityNotifier(video_detector_.get())); |
| 891 #endif | 891 #endif |
| 892 | 892 |
| 893 // The compositor thread and main message loop have to be running in | 893 // The compositor thread and main message loop have to be running in |
| 894 // order to create mirror window. Run it after the main message loop | 894 // order to create mirror window. Run it after the main message loop |
| 895 // is started. | 895 // is started. |
| 896 base::MessageLoopForUI::current()->PostTask( | 896 base::MessageLoopForUI::current()->PostTask( |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 979 //////////////////////////////////////////////////////////////////////////////// | 979 //////////////////////////////////////////////////////////////////////////////// |
| 980 // Shell, aura::client::ActivationChangeObserver implementation: | 980 // Shell, aura::client::ActivationChangeObserver implementation: |
| 981 | 981 |
| 982 void Shell::OnWindowActivated(aura::Window* gained_active, | 982 void Shell::OnWindowActivated(aura::Window* gained_active, |
| 983 aura::Window* lost_active) { | 983 aura::Window* lost_active) { |
| 984 if (gained_active) | 984 if (gained_active) |
| 985 target_root_window_ = gained_active->GetRootWindow(); | 985 target_root_window_ = gained_active->GetRootWindow(); |
| 986 } | 986 } |
| 987 | 987 |
| 988 } // namespace ash | 988 } // namespace ash |
| OLD | NEW |