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

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

Issue 10917075: events: Move some files into ui/base/events/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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
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" 7 #include "ash/wm/property_util.h"
8 #include "ash/wm/user_activity_observer.h" 8 #include "ash/wm/user_activity_observer.h"
9 #include "ui/base/event.h" 9 #include "ui/base/events/event.h"
10 10
11 namespace ash { 11 namespace ash {
12 12
13 const double UserActivityDetector::kNotifyIntervalMs = 200.0; 13 const double UserActivityDetector::kNotifyIntervalMs = 200.0;
14 14
15 UserActivityDetector::UserActivityDetector() { 15 UserActivityDetector::UserActivityDetector() {
16 } 16 }
17 17
18 UserActivityDetector::~UserActivityDetector() { 18 UserActivityDetector::~UserActivityDetector() {
19 } 19 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 !now_for_test_.is_null() ? now_for_test_ : base::TimeTicks::Now(); 62 !now_for_test_.is_null() ? now_for_test_ : base::TimeTicks::Now();
63 if (last_observer_notification_time_.is_null() || 63 if (last_observer_notification_time_.is_null() ||
64 (now - last_observer_notification_time_).InMillisecondsF() >= 64 (now - last_observer_notification_time_).InMillisecondsF() >=
65 kNotifyIntervalMs) { 65 kNotifyIntervalMs) {
66 FOR_EACH_OBSERVER(UserActivityObserver, observers_, OnUserActivity()); 66 FOR_EACH_OBSERVER(UserActivityObserver, observers_, OnUserActivity());
67 last_observer_notification_time_ = now; 67 last_observer_notification_time_ = now;
68 } 68 }
69 } 69 }
70 70
71 } // namespace ash 71 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/toplevel_window_event_filter_unittest.cc ('k') | ash/wm/user_activity_detector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698