OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MEDIA_BASE_MEDIA_CLIENT_H_ | 5 #ifndef MEDIA_BASE_MEDIA_CLIENT_H_ |
6 #define MEDIA_BASE_MEDIA_CLIENT_H_ | 6 #define MEDIA_BASE_MEDIA_CLIENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 MEDIA_EXPORT void SetMediaClient(MediaClient* media_client); | 21 MEDIA_EXPORT void SetMediaClient(MediaClient* media_client); |
22 | 22 |
23 // Media's embedder API should only be used by media. | 23 // Media's embedder API should only be used by media. |
24 #if defined(MEDIA_IMPLEMENTATION) || defined(MEDIA_BLINK_IMPLEMENTATION) | 24 #if defined(MEDIA_IMPLEMENTATION) || defined(MEDIA_BLINK_IMPLEMENTATION) |
25 // Getter for the client. Returns NULL if no customized client is needed. | 25 // Getter for the client. Returns NULL if no customized client is needed. |
26 MEDIA_EXPORT MediaClient* GetMediaClient(); | 26 MEDIA_EXPORT MediaClient* GetMediaClient(); |
27 #endif | 27 #endif |
28 | 28 |
29 struct MEDIA_EXPORT KeySystemInfoForUMA { | 29 struct MEDIA_EXPORT KeySystemInfoForUMA { |
30 KeySystemInfoForUMA(const std::string& key_system, | 30 KeySystemInfoForUMA(const std::string& key_system, |
31 const std::string& key_system_name_for_uma, | 31 const std::string& key_system_name_for_uma); |
32 bool reports_key_system_support_to_uma); | |
33 ~KeySystemInfoForUMA(); | 32 ~KeySystemInfoForUMA(); |
34 | 33 |
35 // Concrete key system name; | 34 // Concrete key system name; |
36 std::string key_system; | 35 std::string key_system; |
37 | 36 |
38 // Display name for UMA reporting. For example, the display name for | 37 // Display name for UMA reporting. For example, the display name for |
39 // "org.w3.clearkey" is "ClearKey". When providing this value, make sure to | 38 // "org.w3.clearkey" is "ClearKey". When providing this value, make sure to |
40 // update tools/metrics/histograms/histograms.xml. | 39 // update tools/metrics/histograms/histograms.xml. |
41 std::string key_system_name_for_uma; | 40 std::string key_system_name_for_uma; |
42 | |
43 // Whether query/support statistics for |key_system| should be reported. | |
44 // If set to true, make sure to add a new Media.EME.KeySystemSupport.* to | |
45 // tools/metrics/histograms/histograms.xml. See KeySystemsSupportUMA for | |
46 // details on how key system query/support UMA is reported. | |
47 bool reports_key_system_support_to_uma; | |
48 }; | 41 }; |
49 | 42 |
50 // A client interface for embedders (e.g. content/renderer) to provide | 43 // A client interface for embedders (e.g. content/renderer) to provide |
51 // customized service. | 44 // customized service. |
52 class MEDIA_EXPORT MediaClient { | 45 class MEDIA_EXPORT MediaClient { |
53 public: | 46 public: |
54 MediaClient(); | 47 MediaClient(); |
55 virtual ~MediaClient(); | 48 virtual ~MediaClient(); |
56 | 49 |
57 // Provides UMA info for key systems that SHOULD be reported to UMA, no matter | 50 // Provides UMA info for key systems that SHOULD be reported to UMA, no matter |
(...skipping 10 matching lines...) Expand all Loading... |
68 std::vector<KeySystemInfo>* key_systems_info) = 0; | 61 std::vector<KeySystemInfo>* key_systems_info) = 0; |
69 | 62 |
70 // Records a domain and registry of a url to a Rappor privacy-preserving | 63 // Records a domain and registry of a url to a Rappor privacy-preserving |
71 // metric. See: https://www.chromium.org/developers/design-documents/rappor | 64 // metric. See: https://www.chromium.org/developers/design-documents/rappor |
72 virtual void RecordRapporURL(const std::string& metric, const GURL& url) = 0; | 65 virtual void RecordRapporURL(const std::string& metric, const GURL& url) = 0; |
73 }; | 66 }; |
74 | 67 |
75 } // namespace media | 68 } // namespace media |
76 | 69 |
77 #endif // MEDIA_BASE_MEDIA_CLIENT_H_ | 70 #endif // MEDIA_BASE_MEDIA_CLIENT_H_ |
OLD | NEW |