Chromium Code Reviews| Index: chrome/browser/chromeos/power/video_activity_notifier.cc |
| diff --git a/chrome/browser/chromeos/power/video_activity_notifier.cc b/chrome/browser/chromeos/power/video_activity_notifier.cc |
| index d0880628cc06ccb697f13d6948f6e4f53d8b1e5d..956844444fd4d436b5627f6e692776f80c5c6c05 100644 |
| --- a/chrome/browser/chromeos/power/video_activity_notifier.cc |
| +++ b/chrome/browser/chromeos/power/video_activity_notifier.cc |
| @@ -25,15 +25,11 @@ VideoActivityNotifier::~VideoActivityNotifier() { |
| ash::Shell::GetInstance()->video_detector()->RemoveObserver(this); |
| } |
| -void VideoActivityNotifier::OnVideoDetected() { |
| +void VideoActivityNotifier::OnVideoDetected(bool is_fullscreen) { |
| 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); |
| - last_notify_time_ = now; |
| - } |
| + DBusThreadManager::Get()->GetPowerManagerClient()-> |
|
Daniel Erat
2012/08/30 20:33:59
the presence of two rate limits was intentional (w
rharrison
2012/08/31 18:57:13
I have reverted this removal.
|
| + NotifyVideoActivity(now, is_fullscreen); |
| + last_notify_time_ = now; |
| } |
| } // namespace chromeos |