Index: chromecast/renderer/media/cast_media_client.h |
diff --git a/chromecast/renderer/media/cast_media_client.h b/chromecast/renderer/media/cast_media_client.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..8a474854c6cd847b21657b320b87baee848d1884 |
--- /dev/null |
+++ b/chromecast/renderer/media/cast_media_client.h |
@@ -0,0 +1,38 @@ |
+// 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_RENDERER_MEDIA_CAST_MEDIA_CLIENT_H_ |
+#define CHROMECAST_RENDERER_MEDIA_CAST_MEDIA_CLIENT_H_ |
+ |
+#include "base/lazy_instance.h" |
+#include "base/macros.h" |
+#include "chromecast/media/base/supported_codec_profile_levels_memo.h" |
+#include "content/public/renderer/content_media_client.h" |
+ |
+namespace chromecast { |
+namespace media { |
+ |
+// Overrides ContentMediaClient::IsSupportedVideoConfig to call |
+// MediaCapabilitiesShlib. Otherwise defers to content::ContentMediaClient. |
+class CastMediaClient : public ::content::ContentMediaClient { |
+ public: |
+ CastMediaClient(content::ContentRendererClient* content_renderer_client, |
+ SupportedCodecProfileLevelsMemo* supported_profiles); |
+ ~CastMediaClient() override; |
+ |
+ // ContentMediaClient overrides. |
+ bool IsSupportedVideoConfig(const ::media::VideoConfig& config) override; |
+ |
+ private: |
+ friend struct base::LazyInstanceTraitsBase<CastMediaClient>; |
+ |
+ SupportedCodecProfileLevelsMemo* supported_profiles_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(CastMediaClient); |
+}; |
+ |
+} // namespace media |
+} // namespace chromecast |
+ |
+#endif // CHROMECAST_RENDERER_MEDIA_CAST_MEDIA_CLIENT_H_ |