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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 #include "ash/system/chromeos/brightness/brightness_controller_chromeos.h" | 131 #include "ash/system/chromeos/brightness/brightness_controller_chromeos.h" |
132 #include "ash/system/chromeos/power/power_event_observer.h" | 132 #include "ash/system/chromeos/power/power_event_observer.h" |
133 #include "ash/system/chromeos/power/power_status.h" | 133 #include "ash/system/chromeos/power/power_status.h" |
134 #include "ash/system/chromeos/power/video_activity_notifier.h" | 134 #include "ash/system/chromeos/power/video_activity_notifier.h" |
135 #include "ash/system/chromeos/session/last_window_closed_logout_reminder.h" | 135 #include "ash/system/chromeos/session/last_window_closed_logout_reminder.h" |
136 #include "ash/system/chromeos/session/logout_confirmation_controller.h" | 136 #include "ash/system/chromeos/session/logout_confirmation_controller.h" |
137 #include "ash/touch/touch_transformer_controller.h" | 137 #include "ash/touch/touch_transformer_controller.h" |
138 #include "ash/virtual_keyboard_controller.h" | 138 #include "ash/virtual_keyboard_controller.h" |
139 #include "base/bind_helpers.h" | 139 #include "base/bind_helpers.h" |
140 #include "base/sys_info.h" | 140 #include "base/sys_info.h" |
141 #include "chromeos/accelerometer/accelerometer_reader.h" | |
142 #include "chromeos/dbus/dbus_thread_manager.h" | 141 #include "chromeos/dbus/dbus_thread_manager.h" |
143 #include "ui/chromeos/user_activity_power_manager_notifier.h" | 142 #include "ui/chromeos/user_activity_power_manager_notifier.h" |
144 #include "ui/display/chromeos/display_configurator.h" | 143 #include "ui/display/chromeos/display_configurator.h" |
145 #endif // defined(OS_CHROMEOS) | 144 #endif // defined(OS_CHROMEOS) |
146 | 145 |
147 namespace ash { | 146 namespace ash { |
148 | 147 |
149 namespace { | 148 namespace { |
150 | 149 |
151 using aura::Window; | 150 using aura::Window; |
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
632 //////////////////////////////////////////////////////////////////////////////// | 631 //////////////////////////////////////////////////////////////////////////////// |
633 // Shell, private: | 632 // Shell, private: |
634 | 633 |
635 Shell::Shell(ShellDelegate* delegate) | 634 Shell::Shell(ShellDelegate* delegate) |
636 : target_root_window_(NULL), | 635 : target_root_window_(NULL), |
637 scoped_target_root_window_(NULL), | 636 scoped_target_root_window_(NULL), |
638 delegate_(delegate), | 637 delegate_(delegate), |
639 window_positioner_(new WindowPositioner), | 638 window_positioner_(new WindowPositioner), |
640 activation_client_(NULL), | 639 activation_client_(NULL), |
641 #if defined(OS_CHROMEOS) | 640 #if defined(OS_CHROMEOS) |
642 accelerometer_reader_(new chromeos::AccelerometerReader()), | |
643 display_configurator_(new ui::DisplayConfigurator()), | 641 display_configurator_(new ui::DisplayConfigurator()), |
644 #endif // defined(OS_CHROMEOS) | 642 #endif // defined(OS_CHROMEOS) |
645 native_cursor_manager_(new AshNativeCursorManager), | 643 native_cursor_manager_(new AshNativeCursorManager), |
646 cursor_manager_( | 644 cursor_manager_( |
647 scoped_ptr<::wm::NativeCursorManager>(native_cursor_manager_)), | 645 scoped_ptr<::wm::NativeCursorManager>(native_cursor_manager_)), |
648 simulate_modal_window_open_for_testing_(false), | 646 simulate_modal_window_open_for_testing_(false), |
649 is_touch_hud_projection_enabled_(false) { | 647 is_touch_hud_projection_enabled_(false) { |
650 DCHECK(delegate_.get()); | 648 DCHECK(delegate_.get()); |
651 gpu_support_.reset(delegate_->CreateGPUSupport()); | 649 gpu_support_.reset(delegate_->CreateGPUSupport()); |
652 display_manager_.reset(new DisplayManager); | 650 display_manager_.reset(new DisplayManager); |
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1158 //////////////////////////////////////////////////////////////////////////////// | 1156 //////////////////////////////////////////////////////////////////////////////// |
1159 // Shell, aura::client::ActivationChangeObserver implementation: | 1157 // Shell, aura::client::ActivationChangeObserver implementation: |
1160 | 1158 |
1161 void Shell::OnWindowActivated(aura::Window* gained_active, | 1159 void Shell::OnWindowActivated(aura::Window* gained_active, |
1162 aura::Window* lost_active) { | 1160 aura::Window* lost_active) { |
1163 if (gained_active) | 1161 if (gained_active) |
1164 target_root_window_ = gained_active->GetRootWindow(); | 1162 target_root_window_ = gained_active->GetRootWindow(); |
1165 } | 1163 } |
1166 | 1164 |
1167 } // namespace ash | 1165 } // namespace ash |
OLD | NEW |