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" |
11 #include "ash/accelerators/accelerator_delegate.h" | 11 #include "ash/accelerators/accelerator_delegate.h" |
12 #include "ash/accelerators/focus_manager_factory.h" | 12 #include "ash/accelerators/focus_manager_factory.h" |
13 #include "ash/accelerators/nested_accelerator_delegate.h" | 13 #include "ash/accelerators/nested_accelerator_delegate.h" |
14 #include "ash/accelerometer/accelerometer_controller.h" | |
15 #include "ash/ash_switches.h" | 14 #include "ash/ash_switches.h" |
16 #include "ash/autoclick/autoclick_controller.h" | 15 #include "ash/autoclick/autoclick_controller.h" |
17 #include "ash/desktop_background/desktop_background_controller.h" | 16 #include "ash/desktop_background/desktop_background_controller.h" |
18 #include "ash/desktop_background/desktop_background_view.h" | 17 #include "ash/desktop_background/desktop_background_view.h" |
19 #include "ash/desktop_background/user_wallpaper_delegate.h" | 18 #include "ash/desktop_background/user_wallpaper_delegate.h" |
20 #include "ash/display/cursor_window_controller.h" | 19 #include "ash/display/cursor_window_controller.h" |
21 #include "ash/display/display_controller.h" | 20 #include "ash/display/display_controller.h" |
22 #include "ash/display/display_manager.h" | 21 #include "ash/display/display_manager.h" |
23 #include "ash/display/event_transformation_handler.h" | 22 #include "ash/display/event_transformation_handler.h" |
24 #include "ash/display/mouse_cursor_event_filter.h" | 23 #include "ash/display/mouse_cursor_event_filter.h" |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 #include "ash/system/chromeos/brightness/brightness_controller_chromeos.h" | 131 #include "ash/system/chromeos/brightness/brightness_controller_chromeos.h" |
133 #include "ash/system/chromeos/power/power_event_observer.h" | 132 #include "ash/system/chromeos/power/power_event_observer.h" |
134 #include "ash/system/chromeos/power/power_status.h" | 133 #include "ash/system/chromeos/power/power_status.h" |
135 #include "ash/system/chromeos/power/video_activity_notifier.h" | 134 #include "ash/system/chromeos/power/video_activity_notifier.h" |
136 #include "ash/system/chromeos/session/last_window_closed_logout_reminder.h" | 135 #include "ash/system/chromeos/session/last_window_closed_logout_reminder.h" |
137 #include "ash/system/chromeos/session/logout_confirmation_controller.h" | 136 #include "ash/system/chromeos/session/logout_confirmation_controller.h" |
138 #include "ash/touch/touch_transformer_controller.h" | 137 #include "ash/touch/touch_transformer_controller.h" |
139 #include "ash/virtual_keyboard_controller.h" | 138 #include "ash/virtual_keyboard_controller.h" |
140 #include "base/bind_helpers.h" | 139 #include "base/bind_helpers.h" |
141 #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" | 142 #include "chromeos/dbus/dbus_thread_manager.h" |
143 #include "ui/chromeos/user_activity_power_manager_notifier.h" | 143 #include "ui/chromeos/user_activity_power_manager_notifier.h" |
144 #include "ui/display/chromeos/display_configurator.h" | 144 #include "ui/display/chromeos/display_configurator.h" |
145 #endif // defined(OS_CHROMEOS) | 145 #endif // defined(OS_CHROMEOS) |
146 | 146 |
147 namespace ash { | 147 namespace ash { |
148 | 148 |
149 namespace { | 149 namespace { |
150 | 150 |
151 using aura::Window; | 151 using aura::Window; |
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
631 | 631 |
632 //////////////////////////////////////////////////////////////////////////////// | 632 //////////////////////////////////////////////////////////////////////////////// |
633 // Shell, private: | 633 // Shell, private: |
634 | 634 |
635 Shell::Shell(ShellDelegate* delegate) | 635 Shell::Shell(ShellDelegate* delegate) |
636 : target_root_window_(NULL), | 636 : target_root_window_(NULL), |
637 scoped_target_root_window_(NULL), | 637 scoped_target_root_window_(NULL), |
638 delegate_(delegate), | 638 delegate_(delegate), |
639 window_positioner_(new WindowPositioner), | 639 window_positioner_(new WindowPositioner), |
640 activation_client_(NULL), | 640 activation_client_(NULL), |
641 accelerometer_controller_(new AccelerometerController()), | |
642 #if defined(OS_CHROMEOS) | 641 #if defined(OS_CHROMEOS) |
| 642 accelerometer_reader_(new chromeos::AccelerometerReader()), |
643 display_configurator_(new ui::DisplayConfigurator()), | 643 display_configurator_(new ui::DisplayConfigurator()), |
644 #endif // defined(OS_CHROMEOS) | 644 #endif // defined(OS_CHROMEOS) |
645 native_cursor_manager_(new AshNativeCursorManager), | 645 native_cursor_manager_(new AshNativeCursorManager), |
646 cursor_manager_( | 646 cursor_manager_( |
647 scoped_ptr< ::wm::NativeCursorManager>(native_cursor_manager_)), | 647 scoped_ptr<::wm::NativeCursorManager>(native_cursor_manager_)), |
648 simulate_modal_window_open_for_testing_(false), | 648 simulate_modal_window_open_for_testing_(false), |
649 is_touch_hud_projection_enabled_(false) { | 649 is_touch_hud_projection_enabled_(false) { |
650 DCHECK(delegate_.get()); | 650 DCHECK(delegate_.get()); |
651 gpu_support_.reset(delegate_->CreateGPUSupport()); | 651 gpu_support_.reset(delegate_->CreateGPUSupport()); |
652 display_manager_.reset(new DisplayManager); | 652 display_manager_.reset(new DisplayManager); |
653 display_controller_.reset(new DisplayController); | 653 display_controller_.reset(new DisplayController); |
654 user_metrics_recorder_.reset(new UserMetricsRecorder); | 654 user_metrics_recorder_.reset(new UserMetricsRecorder); |
655 | 655 |
656 #if defined(OS_CHROMEOS) | 656 #if defined(OS_CHROMEOS) |
657 PowerStatus::Initialize(); | 657 PowerStatus::Initialize(); |
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1158 //////////////////////////////////////////////////////////////////////////////// | 1158 //////////////////////////////////////////////////////////////////////////////// |
1159 // Shell, aura::client::ActivationChangeObserver implementation: | 1159 // Shell, aura::client::ActivationChangeObserver implementation: |
1160 | 1160 |
1161 void Shell::OnWindowActivated(aura::Window* gained_active, | 1161 void Shell::OnWindowActivated(aura::Window* gained_active, |
1162 aura::Window* lost_active) { | 1162 aura::Window* lost_active) { |
1163 if (gained_active) | 1163 if (gained_active) |
1164 target_root_window_ = gained_active->GetRootWindow(); | 1164 target_root_window_ = gained_active->GetRootWindow(); |
1165 } | 1165 } |
1166 | 1166 |
1167 } // namespace ash | 1167 } // namespace ash |
OLD | NEW |