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 #include "media/blink/webencryptedmediaclient_impl.h" | 5 #include "media/blink/webencryptedmediaclient_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 | 82 |
83 const std::string uma_name_; | 83 const std::string uma_name_; |
84 bool is_request_reported_; | 84 bool is_request_reported_; |
85 bool is_support_reported_; | 85 bool is_support_reported_; |
86 }; | 86 }; |
87 | 87 |
88 WebEncryptedMediaClientImpl::WebEncryptedMediaClientImpl( | 88 WebEncryptedMediaClientImpl::WebEncryptedMediaClientImpl( |
89 base::Callback<bool(void)> are_secure_codecs_supported_cb, | 89 base::Callback<bool(void)> are_secure_codecs_supported_cb, |
90 CdmFactory* cdm_factory, | 90 CdmFactory* cdm_factory, |
91 MediaPermission* media_permission, | 91 MediaPermission* media_permission, |
92 const scoped_refptr<MediaLog>& media_log) | 92 MediaLog* media_log) |
93 : are_secure_codecs_supported_cb_(are_secure_codecs_supported_cb), | 93 : are_secure_codecs_supported_cb_(are_secure_codecs_supported_cb), |
94 cdm_factory_(cdm_factory), | 94 cdm_factory_(cdm_factory), |
95 key_system_config_selector_(KeySystems::GetInstance(), media_permission), | 95 key_system_config_selector_(KeySystems::GetInstance(), media_permission), |
96 media_log_(media_log), | 96 media_log_(media_log), |
97 weak_factory_(this) { | 97 weak_factory_(this) { |
98 DCHECK(cdm_factory_); | 98 DCHECK(cdm_factory_); |
99 } | 99 } |
100 | 100 |
101 WebEncryptedMediaClientImpl::~WebEncryptedMediaClientImpl() { | 101 WebEncryptedMediaClientImpl::~WebEncryptedMediaClientImpl() { |
102 } | 102 } |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 | 169 |
170 // Return a per-frame singleton so that UMA reports will be once-per-frame. | 170 // Return a per-frame singleton so that UMA reports will be once-per-frame. |
171 std::string uma_name = GetKeySystemNameForUMA(key_system_ascii); | 171 std::string uma_name = GetKeySystemNameForUMA(key_system_ascii); |
172 std::unique_ptr<Reporter>& reporter = reporters_[uma_name]; | 172 std::unique_ptr<Reporter>& reporter = reporters_[uma_name]; |
173 if (!reporter) | 173 if (!reporter) |
174 reporter = base::MakeUnique<Reporter>(uma_name); | 174 reporter = base::MakeUnique<Reporter>(uma_name); |
175 return reporter.get(); | 175 return reporter.get(); |
176 } | 176 } |
177 | 177 |
178 } // namespace media | 178 } // namespace media |
OLD | NEW |