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

Side by Side Diff: ash/display/display_change_observer_chromeos.cc

Issue 693643004: Make UserActivityDetector a singleton (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@athena_do_not_use_ash45
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « no previous file | ash/shell.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/display/display_change_observer_chromeos.h" 5 #include "ash/display/display_change_observer_chromeos.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 } 260 }
261 261
262 AssociateTouchscreens( 262 AssociateTouchscreens(
263 &displays, ui::DeviceDataManager::GetInstance()->touchscreen_devices()); 263 &displays, ui::DeviceDataManager::GetInstance()->touchscreen_devices());
264 // DisplayManager can be null during the boot. 264 // DisplayManager can be null during the boot.
265 Shell::GetInstance()->display_manager()->OnNativeDisplaysChanged(displays); 265 Shell::GetInstance()->display_manager()->OnNativeDisplaysChanged(displays);
266 266
267 // For the purposes of user activity detection, ignore synthetic mouse events 267 // For the purposes of user activity detection, ignore synthetic mouse events
268 // that are triggered by screen resizes: http://crbug.com/360634 268 // that are triggered by screen resizes: http://crbug.com/360634
269 ::wm::UserActivityDetector* user_activity_detector = 269 ::wm::UserActivityDetector* user_activity_detector =
270 Shell::GetInstance()->user_activity_detector(); 270 ::wm::UserActivityDetector::Get();
271 if (user_activity_detector) 271 if (user_activity_detector)
272 user_activity_detector->OnDisplayPowerChanging(); 272 user_activity_detector->OnDisplayPowerChanging();
273 } 273 }
274 274
275 void DisplayChangeObserver::OnAppTerminating() { 275 void DisplayChangeObserver::OnAppTerminating() {
276 #if defined(USE_ASH) 276 #if defined(USE_ASH)
277 // Stop handling display configuration events once the shutdown 277 // Stop handling display configuration events once the shutdown
278 // process starts. crbug.com/177014. 278 // process starts. crbug.com/177014.
279 Shell::GetInstance()->display_configurator()->PrepareForExit(); 279 Shell::GetInstance()->display_configurator()->PrepareForExit();
280 #endif 280 #endif
(...skipping 10 matching lines...) Expand all
291 291
292 void DisplayChangeObserver::OnTouchscreenDeviceConfigurationChanged() { 292 void DisplayChangeObserver::OnTouchscreenDeviceConfigurationChanged() {
293 OnDisplayModeChanged( 293 OnDisplayModeChanged(
294 Shell::GetInstance()->display_configurator()->cached_displays()); 294 Shell::GetInstance()->display_configurator()->cached_displays());
295 } 295 }
296 296
297 void DisplayChangeObserver::OnKeyboardDeviceConfigurationChanged() { 297 void DisplayChangeObserver::OnKeyboardDeviceConfigurationChanged() {
298 } 298 }
299 299
300 } // namespace ash 300 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698