| Index: chrome/browser/chromeos/power/user_activity_notifier.cc
|
| diff --git a/chrome/browser/chromeos/power/video_activity_notifier.cc b/chrome/browser/chromeos/power/user_activity_notifier.cc
|
| similarity index 62%
|
| copy from chrome/browser/chromeos/power/video_activity_notifier.cc
|
| copy to chrome/browser/chromeos/power/user_activity_notifier.cc
|
| index d0880628cc06ccb697f13d6948f6e4f53d8b1e5d..a558f6edb8b5c095bf25a7a660129c2d4090a746 100644
|
| --- a/chrome/browser/chromeos/power/video_activity_notifier.cc
|
| +++ b/chrome/browser/chromeos/power/user_activity_notifier.cc
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "chrome/browser/chromeos/power/video_activity_notifier.h"
|
| +#include "chrome/browser/chromeos/power/user_activity_notifier.h"
|
|
|
| #include "ash/shell.h"
|
| #include "chromeos/dbus/dbus_thread_manager.h"
|
| @@ -17,21 +17,21 @@ const int kNotifyIntervalSec = 5;
|
|
|
| namespace chromeos {
|
|
|
| -VideoActivityNotifier::VideoActivityNotifier() {
|
| - ash::Shell::GetInstance()->video_detector()->AddObserver(this);
|
| +UserActivityNotifier::UserActivityNotifier() {
|
| + ash::Shell::GetInstance()->user_activity_detector()->AddObserver(this);
|
| }
|
|
|
| -VideoActivityNotifier::~VideoActivityNotifier() {
|
| - ash::Shell::GetInstance()->video_detector()->RemoveObserver(this);
|
| +UserActivityNotifier::~UserActivityNotifier() {
|
| + ash::Shell::GetInstance()->user_activity_detector()->RemoveObserver(this);
|
| }
|
|
|
| -void VideoActivityNotifier::OnVideoDetected() {
|
| +void UserActivityNotifier::OnUserActivity() {
|
| base::TimeTicks now = base::TimeTicks::Now();
|
| // InSeconds() truncates rather than rounding, so it's fine for this
|
| // comparison.
|
| if (last_notify_time_.is_null() ||
|
| (now - last_notify_time_).InSeconds() >= kNotifyIntervalSec) {
|
| - DBusThreadManager::Get()->GetPowerManagerClient()->NotifyVideoActivity(now);
|
| + DBusThreadManager::Get()->GetPowerManagerClient()->NotifyUserActivity(now);
|
| last_notify_time_ = now;
|
| }
|
| }
|
|
|