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

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

Issue 1354723003: Update MediaKeyStatus enum values (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use right DEPS value Created 5 years, 2 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/cdm_adapter.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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 case media::CdmKeyInformation::EXPIRED: 69 case media::CdmKeyInformation::EXPIRED:
70 return blink::WebEncryptedMediaKeyInformation::KeyStatus::Expired; 70 return blink::WebEncryptedMediaKeyInformation::KeyStatus::Expired;
71 case media::CdmKeyInformation::OUTPUT_RESTRICTED: 71 case media::CdmKeyInformation::OUTPUT_RESTRICTED:
72 return blink::WebEncryptedMediaKeyInformation::KeyStatus:: 72 return blink::WebEncryptedMediaKeyInformation::KeyStatus::
73 OutputRestricted; 73 OutputRestricted;
74 case media::CdmKeyInformation::OUTPUT_DOWNSCALED: 74 case media::CdmKeyInformation::OUTPUT_DOWNSCALED:
75 return blink::WebEncryptedMediaKeyInformation::KeyStatus:: 75 return blink::WebEncryptedMediaKeyInformation::KeyStatus::
76 OutputDownscaled; 76 OutputDownscaled;
77 case media::CdmKeyInformation::KEY_STATUS_PENDING: 77 case media::CdmKeyInformation::KEY_STATUS_PENDING:
78 return blink::WebEncryptedMediaKeyInformation::KeyStatus::StatusPending; 78 return blink::WebEncryptedMediaKeyInformation::KeyStatus::StatusPending;
79 case media::CdmKeyInformation::RELEASED:
80 return blink::WebEncryptedMediaKeyInformation::KeyStatus::Released;
79 } 81 }
80 82
81 NOTREACHED(); 83 NOTREACHED();
82 return blink::WebEncryptedMediaKeyInformation::KeyStatus::InternalError; 84 return blink::WebEncryptedMediaKeyInformation::KeyStatus::InternalError;
83 } 85 }
84 86
85 static MediaKeys::SessionType convertSessionType( 87 static MediaKeys::SessionType convertSessionType(
86 blink::WebEncryptedMediaSessionType session_type) { 88 blink::WebEncryptedMediaSessionType session_type) {
87 switch (session_type) { 89 switch (session_type) {
88 case blink::WebEncryptedMediaSessionType::Temporary: 90 case blink::WebEncryptedMediaSessionType::Temporary:
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 return blink::WebContentDecryptionModuleResult::SessionNotFound; 430 return blink::WebContentDecryptionModuleResult::SessionNotFound;
429 431
430 DCHECK(session_id_.empty()) << "Session ID may not be changed once set."; 432 DCHECK(session_id_.empty()) << "Session ID may not be changed once set.";
431 session_id_ = session_id; 433 session_id_ = session_id;
432 return adapter_->RegisterSession(session_id_, weak_ptr_factory_.GetWeakPtr()) 434 return adapter_->RegisterSession(session_id_, weak_ptr_factory_.GetWeakPtr())
433 ? blink::WebContentDecryptionModuleResult::NewSession 435 ? blink::WebContentDecryptionModuleResult::NewSession
434 : blink::WebContentDecryptionModuleResult::SessionAlreadyExists; 436 : blink::WebContentDecryptionModuleResult::SessionAlreadyExists;
435 } 437 }
436 438
437 } // namespace media 439 } // namespace media
OLDNEW
« no previous file with comments | « media/base/cdm_key_information.h ('k') | media/cdm/ppapi/cdm_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698