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

Side by Side Diff: chrome/browser/chromeos/dbus/chrome_display_power_service_provider_delegate.cc

Issue 833893003: Move UserActivityDetector to ui/base/user_activity/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: don't build test on android Created 5 years, 11 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/chromeos/dbus/chrome_display_power_service_provider_del egate.h" 5 #include "chrome/browser/chromeos/dbus/chrome_display_power_service_provider_del egate.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ui/base/user_activity/user_activity_detector.h"
8 #include "ui/display/chromeos/display_configurator.h" 9 #include "ui/display/chromeos/display_configurator.h"
9 #include "ui/wm/core/user_activity_detector.h"
10 10
11 namespace chromeos { 11 namespace chromeos {
12 12
13 ChromeDisplayPowerServiceProviderDelegate:: 13 ChromeDisplayPowerServiceProviderDelegate::
14 ChromeDisplayPowerServiceProviderDelegate() { 14 ChromeDisplayPowerServiceProviderDelegate() {
15 } 15 }
16 16
17 ChromeDisplayPowerServiceProviderDelegate:: 17 ChromeDisplayPowerServiceProviderDelegate::
18 ~ChromeDisplayPowerServiceProviderDelegate() { 18 ~ChromeDisplayPowerServiceProviderDelegate() {
19 } 19 }
20 20
21 void ChromeDisplayPowerServiceProviderDelegate::SetDisplayPower( 21 void ChromeDisplayPowerServiceProviderDelegate::SetDisplayPower(
22 DisplayPowerState power_state) { 22 DisplayPowerState power_state) {
23 // Turning displays off when the device becomes idle or on just before 23 // Turning displays off when the device becomes idle or on just before
24 // we suspend may trigger a mouse move, which would then be incorrectly 24 // we suspend may trigger a mouse move, which would then be incorrectly
25 // reported as user activity. Let the UserActivityDetector 25 // reported as user activity. Let the UserActivityDetector
26 // know so that it can ignore such events. 26 // know so that it can ignore such events.
27 wm::UserActivityDetector::Get()->OnDisplayPowerChanging(); 27 ui::UserActivityDetector::Get()->OnDisplayPowerChanging();
28 28
29 ash::Shell::GetInstance()->display_configurator()->SetDisplayPower( 29 ash::Shell::GetInstance()->display_configurator()->SetDisplayPower(
30 power_state, ui::DisplayConfigurator::kSetDisplayPowerNoFlags); 30 power_state, ui::DisplayConfigurator::kSetDisplayPowerNoFlags);
31 } 31 }
32 32
33 void ChromeDisplayPowerServiceProviderDelegate::SetDimming(bool dimmed) { 33 void ChromeDisplayPowerServiceProviderDelegate::SetDimming(bool dimmed) {
34 ash::Shell::GetInstance()->SetDimming(dimmed); 34 ash::Shell::GetInstance()->SetDimming(dimmed);
35 } 35 }
36 36
37 } // namespace chromeos 37 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/app_mode/kiosk_mode_idle_app_name_notification.cc ('k') | chrome/browser/chromeos/idle_detector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698