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

Unified Diff: ash/display/display_change_observer_chromeos.cc

Issue 570303003: ash: Avoid treating screen resizes as user activity. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: check that UserActivityDetector exists Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/display/display_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/display_change_observer_chromeos.cc
diff --git a/ash/display/display_change_observer_chromeos.cc b/ash/display/display_change_observer_chromeos.cc
index 1d94c131b1c7081d203eac1dd195f3578979d624..cdd1d273e2cac4122e53b2b8101a094eccfccad5 100644
--- a/ash/display/display_change_observer_chromeos.cc
+++ b/ash/display/display_change_observer_chromeos.cc
@@ -26,6 +26,7 @@
#include "ui/events/device_data_manager.h"
#include "ui/events/touchscreen_device.h"
#include "ui/gfx/display.h"
+#include "ui/wm/core/user_activity_detector.h"
namespace ash {
@@ -246,6 +247,13 @@ void DisplayChangeObserver::OnDisplayModeChanged(
&displays, ui::DeviceDataManager::GetInstance()->touchscreen_devices());
// DisplayManager can be null during the boot.
Shell::GetInstance()->display_manager()->OnNativeDisplaysChanged(displays);
+
+ // For the purposes of user activity detection, ignore synthetic mouse events
+ // that are triggered by screen resizes: http://crbug.com/360634
+ ::wm::UserActivityDetector* user_activity_detector =
+ Shell::GetInstance()->user_activity_detector();
+ if (user_activity_detector)
+ user_activity_detector->OnDisplayPowerChanging();
}
void DisplayChangeObserver::OnAppTerminating() {
« no previous file with comments | « no previous file | ash/display/display_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698