Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(433)

Side by Side Diff: ash/shell.cc

Issue 648733003: Implement ScreenOrientationDelegate on ChromeOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Generalize rotation locking Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 #include "ash/display/display_configurator_animation.h" 127 #include "ash/display/display_configurator_animation.h"
128 #include "ash/display/display_error_observer_chromeos.h" 128 #include "ash/display/display_error_observer_chromeos.h"
129 #include "ash/display/projecting_observer_chromeos.h" 129 #include "ash/display/projecting_observer_chromeos.h"
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/bluetooth/bluetooth_notification_controller.h"
133 #include "ash/system/chromeos/brightness/brightness_controller_chromeos.h" 133 #include "ash/system/chromeos/brightness/brightness_controller_chromeos.h"
134 #include "ash/system/chromeos/power/power_event_observer.h" 134 #include "ash/system/chromeos/power/power_event_observer.h"
135 #include "ash/system/chromeos/power/power_status.h" 135 #include "ash/system/chromeos/power/power_status.h"
136 #include "ash/system/chromeos/power/video_activity_notifier.h" 136 #include "ash/system/chromeos/power/video_activity_notifier.h"
137 #include "ash/system/chromeos/screen_orientation/screen_orientation_delegate_ash .h"
137 #include "ash/system/chromeos/session/last_window_closed_logout_reminder.h" 138 #include "ash/system/chromeos/session/last_window_closed_logout_reminder.h"
138 #include "ash/system/chromeos/session/logout_confirmation_controller.h" 139 #include "ash/system/chromeos/session/logout_confirmation_controller.h"
139 #include "base/bind_helpers.h" 140 #include "base/bind_helpers.h"
140 #include "base/sys_info.h" 141 #include "base/sys_info.h"
141 #include "chromeos/dbus/dbus_thread_manager.h" 142 #include "chromeos/dbus/dbus_thread_manager.h"
142 #include "ui/chromeos/user_activity_power_manager_notifier.h" 143 #include "ui/chromeos/user_activity_power_manager_notifier.h"
143 #include "ui/display/chromeos/display_configurator.h" 144 #include "ui/display/chromeos/display_configurator.h"
144 #endif // defined(OS_CHROMEOS) 145 #endif // defined(OS_CHROMEOS)
145 146
146 namespace ash { 147 namespace ash {
(...skipping 902 matching lines...) Expand 10 before | Expand all | Expand 10 after
1049 scoped_ptr<ash::BrightnessControlDelegate>( 1050 scoped_ptr<ash::BrightnessControlDelegate>(
1050 new ash::system::BrightnessControllerChromeos).Pass()); 1051 new ash::system::BrightnessControllerChromeos).Pass());
1051 1052
1052 power_event_observer_.reset(new PowerEventObserver()); 1053 power_event_observer_.reset(new PowerEventObserver());
1053 user_activity_notifier_.reset( 1054 user_activity_notifier_.reset(
1054 new ui::UserActivityPowerManagerNotifier(user_activity_detector_.get())); 1055 new ui::UserActivityPowerManagerNotifier(user_activity_detector_.get()));
1055 video_activity_notifier_.reset( 1056 video_activity_notifier_.reset(
1056 new VideoActivityNotifier(video_detector_.get())); 1057 new VideoActivityNotifier(video_detector_.get()));
1057 bluetooth_notification_controller_.reset(new BluetoothNotificationController); 1058 bluetooth_notification_controller_.reset(new BluetoothNotificationController);
1058 last_window_closed_logout_reminder_.reset(new LastWindowClosedLogoutReminder); 1059 last_window_closed_logout_reminder_.reset(new LastWindowClosedLogoutReminder);
1060 screen_orientation_delegate_.reset(new ScreenOrientationDelegateAsh());
1059 #endif 1061 #endif
1060 1062
1061 weak_display_manager_factory_.reset( 1063 weak_display_manager_factory_.reset(
1062 new base::WeakPtrFactory<DisplayManager>(display_manager_.get())); 1064 new base::WeakPtrFactory<DisplayManager>(display_manager_.get()));
1063 // The compositor thread and main message loop have to be running in 1065 // The compositor thread and main message loop have to be running in
1064 // order to create mirror window. Run it after the main message loop 1066 // order to create mirror window. Run it after the main message loop
1065 // is started. 1067 // is started.
1066 base::MessageLoopForUI::current()->PostTask( 1068 base::MessageLoopForUI::current()->PostTask(
1067 FROM_HERE, 1069 FROM_HERE,
1068 base::Bind(&DisplayManager::CreateMirrorWindowIfAny, 1070 base::Bind(&DisplayManager::CreateMirrorWindowIfAny,
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
1159 //////////////////////////////////////////////////////////////////////////////// 1161 ////////////////////////////////////////////////////////////////////////////////
1160 // Shell, aura::client::ActivationChangeObserver implementation: 1162 // Shell, aura::client::ActivationChangeObserver implementation:
1161 1163
1162 void Shell::OnWindowActivated(aura::Window* gained_active, 1164 void Shell::OnWindowActivated(aura::Window* gained_active,
1163 aura::Window* lost_active) { 1165 aura::Window* lost_active) {
1164 if (gained_active) 1166 if (gained_active)
1165 target_root_window_ = gained_active->GetRootWindow(); 1167 target_root_window_ = gained_active->GetRootWindow();
1166 } 1168 }
1167 1169
1168 } // namespace ash 1170 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698