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

Side by Side Diff: media/blink/webencryptedmediaclient_impl.cc

Issue 2815303006: Convert MediaLog from being ref counted to owned by WebMediaPlayer. (Closed)
Patch Set: Rebase. Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « media/blink/webencryptedmediaclient_impl.h ('k') | media/blink/webmediaplayer_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « media/blink/webencryptedmediaclient_impl.h ('k') | media/blink/webmediaplayer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698