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

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: Sync and rebase. 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 #include "ui/wm/core/window_modality_controller.h" 119 #include "ui/wm/core/window_modality_controller.h"
120 120
121 #if defined(OS_CHROMEOS) 121 #if defined(OS_CHROMEOS)
122 #if defined(USE_X11) 122 #if defined(USE_X11)
123 #include "ui/gfx/x/x11_types.h" // nogncheck 123 #include "ui/gfx/x/x11_types.h" // nogncheck
124 #endif // defined(USE_X11) 124 #endif // defined(USE_X11)
125 #include "ash/accelerators/magnifier_key_scroller.h" 125 #include "ash/accelerators/magnifier_key_scroller.h"
126 #include "ash/accelerators/spoken_feedback_toggler.h" 126 #include "ash/accelerators/spoken_feedback_toggler.h"
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/brightness/brightness_controller_chromeos.h "
129 #include "ash/common/system/chromeos/power/power_status.h" 130 #include "ash/common/system/chromeos/power/power_status.h"
130 #include "ash/display/display_change_observer_chromeos.h" 131 #include "ash/display/display_change_observer_chromeos.h"
131 #include "ash/display/display_color_manager_chromeos.h" 132 #include "ash/display/display_color_manager_chromeos.h"
132 #include "ash/display/display_error_observer_chromeos.h" 133 #include "ash/display/display_error_observer_chromeos.h"
133 #include "ash/display/projecting_observer_chromeos.h" 134 #include "ash/display/projecting_observer_chromeos.h"
134 #include "ash/display/resolution_notification_controller.h" 135 #include "ash/display/resolution_notification_controller.h"
135 #include "ash/display/screen_orientation_controller_chromeos.h" 136 #include "ash/display/screen_orientation_controller_chromeos.h"
136 #include "ash/sticky_keys/sticky_keys_controller.h" 137 #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" 138 #include "ash/system/chromeos/power/power_event_observer.h"
139 #include "ash/system/chromeos/power/video_activity_notifier.h" 139 #include "ash/system/chromeos/power/video_activity_notifier.h"
140 #include "ash/touch/touch_transformer_controller.h" 140 #include "ash/touch/touch_transformer_controller.h"
141 #include "ash/virtual_keyboard_controller.h" 141 #include "ash/virtual_keyboard_controller.h"
142 #include "base/bind_helpers.h" 142 #include "base/bind_helpers.h"
143 #include "base/sys_info.h" 143 #include "base/sys_info.h"
144 #include "chromeos/audio/audio_a11y_controller.h" 144 #include "chromeos/audio/audio_a11y_controller.h"
145 #include "chromeos/dbus/dbus_thread_manager.h" 145 #include "chromeos/dbus/dbus_thread_manager.h"
146 #include "ui/chromeos/user_activity_power_manager_notifier.h" 146 #include "ui/chromeos/user_activity_power_manager_notifier.h"
147 #include "ui/display/chromeos/display_configurator.h" 147 #include "ui/display/chromeos/display_configurator.h"
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after
1066 // the correct size. 1066 // the correct size.
1067 user_wallpaper_delegate_->InitializeWallpaper(); 1067 user_wallpaper_delegate_->InitializeWallpaper();
1068 1068
1069 if (cursor_manager_) { 1069 if (cursor_manager_) {
1070 if (initially_hide_cursor_) 1070 if (initially_hide_cursor_)
1071 cursor_manager_->HideCursor(); 1071 cursor_manager_->HideCursor();
1072 cursor_manager_->SetCursor(ui::kCursorPointer); 1072 cursor_manager_->SetCursor(ui::kCursorPointer);
1073 } 1073 }
1074 1074
1075 #if defined(OS_CHROMEOS) 1075 #if defined(OS_CHROMEOS)
1076 // Set accelerator controller delegates. 1076 WmShell::Get()->SetBrightnessControlDelegate(
msw 2016/07/07 22:41:59 I could move this to WmShell's ctor or similar; wd
James Cook 2016/07/07 23:08:49 I would try moving it to WmShell ctor. If that wor
msw 2016/07/08 01:40:48 Done.
1077 accelerator_controller_->SetBrightnessControlDelegate( 1077 base::WrapUnique(new system::BrightnessControllerChromeos));
1078 std::unique_ptr<BrightnessControlDelegate>(
1079 new system::BrightnessControllerChromeos));
1080 1078
1081 power_event_observer_.reset(new PowerEventObserver()); 1079 power_event_observer_.reset(new PowerEventObserver());
1082 user_activity_notifier_.reset( 1080 user_activity_notifier_.reset(
1083 new ui::UserActivityPowerManagerNotifier(user_activity_detector_.get())); 1081 new ui::UserActivityPowerManagerNotifier(user_activity_detector_.get()));
1084 video_activity_notifier_.reset( 1082 video_activity_notifier_.reset(
1085 new VideoActivityNotifier(video_detector_.get())); 1083 new VideoActivityNotifier(video_detector_.get()));
1086 bluetooth_notification_controller_.reset(new BluetoothNotificationController); 1084 bluetooth_notification_controller_.reset(new BluetoothNotificationController);
1087 screen_orientation_controller_.reset(new ScreenOrientationController()); 1085 screen_orientation_controller_.reset(new ScreenOrientationController());
1088 #endif 1086 #endif
1089 // The compositor thread and main message loop have to be running in 1087 // The compositor thread and main message loop have to be running in
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
1174 1172
1175 void Shell::OnWindowActivated( 1173 void Shell::OnWindowActivated(
1176 aura::client::ActivationChangeObserver::ActivationReason reason, 1174 aura::client::ActivationChangeObserver::ActivationReason reason,
1177 aura::Window* gained_active, 1175 aura::Window* gained_active,
1178 aura::Window* lost_active) { 1176 aura::Window* lost_active) {
1179 if (gained_active) 1177 if (gained_active)
1180 target_root_window_ = gained_active->GetRootWindow(); 1178 target_root_window_ = gained_active->GetRootWindow();
1181 } 1179 }
1182 1180
1183 } // namespace ash 1181 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698