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

Unified Diff: chromecast/renderer/media/cast_media_client.h

Issue 2712983004: Simplify/Cleanup MediaClient (Closed)
Patch Set: Created 3 years, 9 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: 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_

Powered by Google App Engine
This is Rietveld 408576698