Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROMECAST_BROWSER_MEDIA_VIDEO_RESOLUTION_POLICY_H_ | |
| 6 #define CHROMECAST_BROWSER_MEDIA_VIDEO_RESOLUTION_POLICY_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 | |
| 10 namespace gfx { | |
| 11 class Size; | |
| 12 } // namespace gfx | |
| 13 | |
| 14 namespace chromecast { | |
| 15 namespace media { | |
| 16 | |
| 17 // Interface allowing renderer to check for whether certain video resolutions | |
| 18 // should have playback blocked. | |
| 19 // 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
| |
| 20 class VideoResolutionPolicy { | |
| 21 public: | |
| 22 // Observer allows policy subclass to notify renderer when some | |
| 23 // conditions have changed. Renderer should re-check current | |
| 24 // resolution. | |
| 25 class Observer { | |
| 26 public: | |
| 27 virtual void OnVideoResolutionPolicyChanged() = 0; | |
| 28 | |
| 29 protected: | |
| 30 virtual ~Observer() {} | |
| 31 }; | |
| 32 | |
| 33 virtual ~VideoResolutionPolicy(); | |
| 34 | |
| 35 virtual void AddObserver(Observer* observer) = 0; | |
| 36 virtual void RemoveObserver(Observer* observer) = 0; | |
| 37 | |
| 38 virtual bool ShouldBlock(const gfx::Size& size) = 0; | |
| 39 }; | |
| 40 | |
| 41 } // namespace media | |
| 42 } // namespace chromecast | |
| 43 | |
| 44 #endif // CHROMECAST_BROWSER_MEDIA_VIDEO_RESOLUTION_POLICY_H_ | |
| OLD | NEW |