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

Side by Side Diff: ash/wm/user_activity_detector.cc

Issue 24108003: [Cleanup] Rename WindowSettings to WindowState (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase fix Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/wm/toplevel_window_event_handler_unittest.cc ('k') | ash/wm/video_detector.cc » ('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 (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/wm/user_activity_detector.h" 5 #include "ash/wm/user_activity_detector.h"
6 6
7 #include "ash/wm/property_util.h"
8 #include "ash/wm/user_activity_observer.h" 7 #include "ash/wm/user_activity_observer.h"
9 #include "ui/events/event.h" 8 #include "ui/events/event.h"
10 9
11 namespace ash { 10 namespace ash {
12 11
13 const int UserActivityDetector::kNotifyIntervalMs = 200; 12 const int UserActivityDetector::kNotifyIntervalMs = 200;
14 13
15 // Too low and mouse events generated at the tail end of reconfiguration 14 // Too low and mouse events generated at the tail end of reconfiguration
16 // will be reported as user activity and turn the screen back on; too high 15 // will be reported as user activity and turn the screen back on; too high
17 // and we'll ignore legitimate activity. 16 // and we'll ignore legitimate activity.
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 last_activity_time_ = now; 74 last_activity_time_ = now;
76 if (last_observer_notification_time_.is_null() || 75 if (last_observer_notification_time_.is_null() ||
77 (now - last_observer_notification_time_).InMillisecondsF() >= 76 (now - last_observer_notification_time_).InMillisecondsF() >=
78 kNotifyIntervalMs) { 77 kNotifyIntervalMs) {
79 FOR_EACH_OBSERVER(UserActivityObserver, observers_, OnUserActivity(event)); 78 FOR_EACH_OBSERVER(UserActivityObserver, observers_, OnUserActivity(event));
80 last_observer_notification_time_ = now; 79 last_observer_notification_time_ = now;
81 } 80 }
82 } 81 }
83 82
84 } // namespace ash 83 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/toplevel_window_event_handler_unittest.cc ('k') | ash/wm/video_detector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698