OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2014 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 CONTENT_PUBLIC_RENDERER_CONTENT_MEDIA_CLIENT_ | |
6 #define CONTENT_PUBLIC_RENDERER_CONTENT_MEDIA_CLIENT_ | |
7 | |
8 #include "base/threading/thread_checker.h" | |
9 #include "content/public/renderer/content_renderer_client.h" | |
10 #include "media/base/media_client.h" | |
11 | |
12 namespace content { | |
13 | |
14 // Provides a default MediaClient for content embedders simply want to defer | |
15 // supported Key Systems and Rapport recording to their ContentRenderClient. | |
xhwang
2017/03/22 05:58:52
s/Rapport/Rappor
| |
16 // | |
17 // IsSupportedVideoConfig() will assess support for the Media Platform in its | |
18 // default state. Embedders who customize the Media Platform (e.g. Chromecast) | |
19 // should override this method to reflect their changes. | |
20 class CONTENT_EXPORT ContentMediaClient : public media::MediaClient { | |
xhwang
2017/03/22 05:58:52
I have a few thoughts on this. I am not following
chcunningham
2017/03/22 18:25:46
Thanks. I'm agree the direction you propose sounds
xhwang
2017/03/22 21:54:52
I always feel "renderer" is part of "content" so w
chcunningham
2017/03/22 23:22:51
The logic for key system decode capabilities could
| |
21 public: | |
22 explicit ContentMediaClient( | |
23 content::ContentRendererClient* content_renderer_client); | |
24 ~ContentMediaClient() override; | |
25 | |
26 // MediaClient implementation. | |
27 void AddSupportedKeySystems( | |
28 std::vector<std::unique_ptr<media::KeySystemProperties>>* | |
29 key_systems_properties) override; | |
30 void RecordRapporURL(const std::string& metric, const GURL& url) override; | |
31 bool IsSupportedVideoConfig(const media::VideoConfig& config) override; | |
32 | |
33 protected: | |
34 friend class ContentMediaClientTest; | |
35 | |
36 // Makes sure all methods are called from the same thread. | |
37 base::ThreadChecker thread_checker_; | |
38 | |
39 content::ContentRendererClient* content_renderer_client_; | |
40 | |
41 DISALLOW_COPY_AND_ASSIGN(ContentMediaClient); | |
42 }; | |
43 | |
44 } // namespace content | |
45 | |
46 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_MEDIA_CLIENT_ | |
OLD | NEW |