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

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

Issue 1005213002: Add missing CdmKeyInformation enum values (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename enum for Windows Created 5 years, 9 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/base/cdm_key_information.h ('k') | media/cdm/ppapi/external_clear_key/clear_key_cdm.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "webcontentdecryptionmodulesession_impl.h" 5 #include "webcontentdecryptionmodulesession_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/numerics/safe_conversions.h" 10 #include "base/numerics/safe_conversions.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 switch (status) { 55 switch (status) {
56 case media::CdmKeyInformation::USABLE: 56 case media::CdmKeyInformation::USABLE:
57 return blink::WebEncryptedMediaKeyInformation::KeyStatus::Usable; 57 return blink::WebEncryptedMediaKeyInformation::KeyStatus::Usable;
58 case media::CdmKeyInformation::INTERNAL_ERROR: 58 case media::CdmKeyInformation::INTERNAL_ERROR:
59 return blink::WebEncryptedMediaKeyInformation::KeyStatus::InternalError; 59 return blink::WebEncryptedMediaKeyInformation::KeyStatus::InternalError;
60 case media::CdmKeyInformation::EXPIRED: 60 case media::CdmKeyInformation::EXPIRED:
61 return blink::WebEncryptedMediaKeyInformation::KeyStatus::Expired; 61 return blink::WebEncryptedMediaKeyInformation::KeyStatus::Expired;
62 case media::CdmKeyInformation::OUTPUT_NOT_ALLOWED: 62 case media::CdmKeyInformation::OUTPUT_NOT_ALLOWED:
63 return blink::WebEncryptedMediaKeyInformation::KeyStatus:: 63 return blink::WebEncryptedMediaKeyInformation::KeyStatus::
64 OutputNotAllowed; 64 OutputNotAllowed;
65 case media::CdmKeyInformation::OUTPUT_DOWNSCALED:
66 return blink::WebEncryptedMediaKeyInformation::KeyStatus::
67 OutputDownscaled;
68 case media::CdmKeyInformation::KEY_STATUS_PENDING:
69 return blink::WebEncryptedMediaKeyInformation::KeyStatus::StatusPending;
65 } 70 }
66 71
67 NOTREACHED(); 72 NOTREACHED();
68 return blink::WebEncryptedMediaKeyInformation::KeyStatus::InternalError; 73 return blink::WebEncryptedMediaKeyInformation::KeyStatus::InternalError;
69 } 74 }
70 75
71 WebContentDecryptionModuleSessionImpl::WebContentDecryptionModuleSessionImpl( 76 WebContentDecryptionModuleSessionImpl::WebContentDecryptionModuleSessionImpl(
72 const scoped_refptr<CdmSessionAdapter>& adapter) 77 const scoped_refptr<CdmSessionAdapter>& adapter)
73 : adapter_(adapter), is_closed_(false), weak_ptr_factory_(this) { 78 : adapter_(adapter), is_closed_(false), weak_ptr_factory_(this) {
74 } 79 }
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 return blink::WebContentDecryptionModuleResult::SessionNotFound; 264 return blink::WebContentDecryptionModuleResult::SessionNotFound;
260 265
261 DCHECK(session_id_.empty()) << "Session ID may not be changed once set."; 266 DCHECK(session_id_.empty()) << "Session ID may not be changed once set.";
262 session_id_ = session_id; 267 session_id_ = session_id;
263 return adapter_->RegisterSession(session_id_, weak_ptr_factory_.GetWeakPtr()) 268 return adapter_->RegisterSession(session_id_, weak_ptr_factory_.GetWeakPtr())
264 ? blink::WebContentDecryptionModuleResult::NewSession 269 ? blink::WebContentDecryptionModuleResult::NewSession
265 : blink::WebContentDecryptionModuleResult::SessionAlreadyExists; 270 : blink::WebContentDecryptionModuleResult::SessionAlreadyExists;
266 } 271 }
267 272
268 } // namespace media 273 } // namespace media
OLDNEW
« no previous file with comments | « media/base/cdm_key_information.h ('k') | media/cdm/ppapi/external_clear_key/clear_key_cdm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698