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

Unified Diff: chrome/browser/chromeos/power/video_activity_notifier.cc

Issue 10905026: Add is_fullscreen to video updates (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
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

Powered by Google App Engine
This is Rietveld 408576698