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

Side by Side Diff: ash/shell.cc

Issue 2131733002: mash: Migrate [Keyboard]Brightness code to ash/common. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup. Created 4 years, 5 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 #include <utility> 9 #include <utility>
10 10
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 #include "ash/common/ash_constants.h" 127 #include "ash/common/ash_constants.h"
128 #include "ash/common/system/chromeos/bluetooth/bluetooth_notification_controller .h" 128 #include "ash/common/system/chromeos/bluetooth/bluetooth_notification_controller .h"
129 #include "ash/common/system/chromeos/power/power_status.h" 129 #include "ash/common/system/chromeos/power/power_status.h"
130 #include "ash/display/display_change_observer_chromeos.h" 130 #include "ash/display/display_change_observer_chromeos.h"
131 #include "ash/display/display_color_manager_chromeos.h" 131 #include "ash/display/display_color_manager_chromeos.h"
132 #include "ash/display/display_error_observer_chromeos.h" 132 #include "ash/display/display_error_observer_chromeos.h"
133 #include "ash/display/projecting_observer_chromeos.h" 133 #include "ash/display/projecting_observer_chromeos.h"
134 #include "ash/display/resolution_notification_controller.h" 134 #include "ash/display/resolution_notification_controller.h"
135 #include "ash/display/screen_orientation_controller_chromeos.h" 135 #include "ash/display/screen_orientation_controller_chromeos.h"
136 #include "ash/sticky_keys/sticky_keys_controller.h" 136 #include "ash/sticky_keys/sticky_keys_controller.h"
137 #include "ash/system/chromeos/brightness/brightness_controller_chromeos.h"
138 #include "ash/system/chromeos/power/power_event_observer.h" 137 #include "ash/system/chromeos/power/power_event_observer.h"
139 #include "ash/system/chromeos/power/video_activity_notifier.h" 138 #include "ash/system/chromeos/power/video_activity_notifier.h"
140 #include "ash/touch/touch_transformer_controller.h" 139 #include "ash/touch/touch_transformer_controller.h"
141 #include "ash/virtual_keyboard_controller.h" 140 #include "ash/virtual_keyboard_controller.h"
142 #include "base/bind_helpers.h" 141 #include "base/bind_helpers.h"
143 #include "base/sys_info.h" 142 #include "base/sys_info.h"
144 #include "chromeos/audio/audio_a11y_controller.h" 143 #include "chromeos/audio/audio_a11y_controller.h"
145 #include "chromeos/dbus/dbus_thread_manager.h" 144 #include "chromeos/dbus/dbus_thread_manager.h"
146 #include "ui/chromeos/user_activity_power_manager_notifier.h" 145 #include "ui/chromeos/user_activity_power_manager_notifier.h"
147 #include "ui/display/chromeos/display_configurator.h" 146 #include "ui/display/chromeos/display_configurator.h"
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after
1066 // the correct size. 1065 // the correct size.
1067 user_wallpaper_delegate_->InitializeWallpaper(); 1066 user_wallpaper_delegate_->InitializeWallpaper();
1068 1067
1069 if (cursor_manager_) { 1068 if (cursor_manager_) {
1070 if (initially_hide_cursor_) 1069 if (initially_hide_cursor_)
1071 cursor_manager_->HideCursor(); 1070 cursor_manager_->HideCursor();
1072 cursor_manager_->SetCursor(ui::kCursorPointer); 1071 cursor_manager_->SetCursor(ui::kCursorPointer);
1073 } 1072 }
1074 1073
1075 #if defined(OS_CHROMEOS) 1074 #if defined(OS_CHROMEOS)
1076 // Set accelerator controller delegates.
1077 accelerator_controller_->SetBrightnessControlDelegate(
1078 std::unique_ptr<BrightnessControlDelegate>(
1079 new system::BrightnessControllerChromeos));
1080
1081 power_event_observer_.reset(new PowerEventObserver()); 1075 power_event_observer_.reset(new PowerEventObserver());
1082 user_activity_notifier_.reset( 1076 user_activity_notifier_.reset(
1083 new ui::UserActivityPowerManagerNotifier(user_activity_detector_.get())); 1077 new ui::UserActivityPowerManagerNotifier(user_activity_detector_.get()));
1084 video_activity_notifier_.reset( 1078 video_activity_notifier_.reset(
1085 new VideoActivityNotifier(video_detector_.get())); 1079 new VideoActivityNotifier(video_detector_.get()));
1086 bluetooth_notification_controller_.reset(new BluetoothNotificationController); 1080 bluetooth_notification_controller_.reset(new BluetoothNotificationController);
1087 screen_orientation_controller_.reset(new ScreenOrientationController()); 1081 screen_orientation_controller_.reset(new ScreenOrientationController());
1088 #endif 1082 #endif
1089 // The compositor thread and main message loop have to be running in 1083 // The compositor thread and main message loop have to be running in
1090 // order to create mirror window. Run it after the main message loop 1084 // order to create mirror window. Run it after the main message loop
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
1174 1168
1175 void Shell::OnWindowActivated( 1169 void Shell::OnWindowActivated(
1176 aura::client::ActivationChangeObserver::ActivationReason reason, 1170 aura::client::ActivationChangeObserver::ActivationReason reason,
1177 aura::Window* gained_active, 1171 aura::Window* gained_active,
1178 aura::Window* lost_active) { 1172 aura::Window* lost_active) {
1179 if (gained_active) 1173 if (gained_active)
1180 target_root_window_ = gained_active->GetRootWindow(); 1174 target_root_window_ = gained_active->GetRootWindow();
1181 } 1175 }
1182 1176
1183 } // namespace ash 1177 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698