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

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

Issue 887873003: media: Add DefaultMediaPermission. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase only Created 5 years, 10 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/encrypted_media_player_support.cc ('k') | media/blink/webmediaplayer_impl.cc » ('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 "webencryptedmediaclient_impl.h" 5 #include "webencryptedmediaclient_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 base::Histogram::kUmaTargetedHistogramFlag)->Add(status); 181 base::Histogram::kUmaTargetedHistogramFlag)->Add(status);
182 } 182 }
183 183
184 const std::string uma_name_; 184 const std::string uma_name_;
185 bool is_request_reported_; 185 bool is_request_reported_;
186 bool is_support_reported_; 186 bool is_support_reported_;
187 }; 187 };
188 188
189 WebEncryptedMediaClientImpl::WebEncryptedMediaClientImpl( 189 WebEncryptedMediaClientImpl::WebEncryptedMediaClientImpl(
190 scoped_ptr<CdmFactory> cdm_factory, 190 scoped_ptr<CdmFactory> cdm_factory,
191 MediaPermission* /* media_permission */) 191 MediaPermission* media_permission)
192 : cdm_factory_(cdm_factory.Pass()) { 192 : cdm_factory_(cdm_factory.Pass()) {
193 // TODO(sandersd): Use |media_permission| to check for media permissions in 193 // TODO(sandersd): Use |media_permission| to check for media permissions in
194 // this class. 194 // this class.
195 DCHECK(media_permission);
195 } 196 }
196 197
197 WebEncryptedMediaClientImpl::~WebEncryptedMediaClientImpl() { 198 WebEncryptedMediaClientImpl::~WebEncryptedMediaClientImpl() {
198 } 199 }
199 200
200 void WebEncryptedMediaClientImpl::requestMediaKeySystemAccess( 201 void WebEncryptedMediaClientImpl::requestMediaKeySystemAccess(
201 blink::WebEncryptedMediaRequest request) { 202 blink::WebEncryptedMediaRequest request) {
202 // TODO(jrummell): This should be asynchronous. 203 // TODO(jrummell): This should be asynchronous.
203 204
204 // Continued from requestMediaKeySystemAccess(), step 7, from 205 // Continued from requestMediaKeySystemAccess(), step 7, from
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 return reporter; 269 return reporter;
269 270
270 // Reporter not found, so create one. 271 // Reporter not found, so create one.
271 auto result = 272 auto result =
272 reporters_.add(uma_name, make_scoped_ptr(new Reporter(uma_name))); 273 reporters_.add(uma_name, make_scoped_ptr(new Reporter(uma_name)));
273 DCHECK(result.second); 274 DCHECK(result.second);
274 return result.first->second; 275 return result.first->second;
275 } 276 }
276 277
277 } // namespace media 278 } // namespace media
OLDNEW
« no previous file with comments | « media/blink/encrypted_media_player_support.cc ('k') | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698