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

Unified Diff: chromecast/browser/media/video_resolution_policy.h

Issue 2277853002: [Chromecast] Support blocking some video resolutions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add TODO on removal plan Created 4 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
« no previous file with comments | « chromecast/browser/media/cast_renderer.cc ('k') | chromecast/browser/media/video_resolution_policy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/browser/media/video_resolution_policy.h
diff --git a/chromecast/browser/media/video_resolution_policy.h b/chromecast/browser/media/video_resolution_policy.h
new file mode 100644
index 0000000000000000000000000000000000000000..b63ac470ffca331d6b36740b43d72b20be8496e0
--- /dev/null
+++ b/chromecast/browser/media/video_resolution_policy.h
@@ -0,0 +1,44 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROMECAST_BROWSER_MEDIA_VIDEO_RESOLUTION_POLICY_H_
+#define CHROMECAST_BROWSER_MEDIA_VIDEO_RESOLUTION_POLICY_H_
+
+#include "base/macros.h"
+
+namespace gfx {
+class Size;
+} // namespace gfx
+
+namespace chromecast {
+namespace media {
+
+// Interface allowing renderer to check for whether certain video resolutions
+// should have playback blocked.
+// TODO(halliwell): remove this mechanism once we have PR3.
servolk 2016/08/26 22:36:22 Nit: if there's a tracking bug for this, let's men
+class VideoResolutionPolicy {
+ public:
+ // Observer allows policy subclass to notify renderer when some
+ // conditions have changed. Renderer should re-check current
+ // resolution.
+ class Observer {
+ public:
+ virtual void OnVideoResolutionPolicyChanged() = 0;
+
+ protected:
+ virtual ~Observer() {}
+ };
+
+ virtual ~VideoResolutionPolicy();
+
+ virtual void AddObserver(Observer* observer) = 0;
+ virtual void RemoveObserver(Observer* observer) = 0;
+
+ virtual bool ShouldBlock(const gfx::Size& size) = 0;
+};
+
+} // namespace media
+} // namespace chromecast
+
+#endif // CHROMECAST_BROWSER_MEDIA_VIDEO_RESOLUTION_POLICY_H_
« no previous file with comments | « chromecast/browser/media/cast_renderer.cc ('k') | chromecast/browser/media/video_resolution_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698