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: chromecast/media/cdm/cast_cdm_proxy.cc

Issue 2444683002: Move MediaKeys::Exception to CdmPromise::Exception (Closed)
Patch Set: include "media/base/media_keys.h" Created 4 years, 1 month 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 | « no previous file | content/renderer/media/cdm/ppapi_decryptor.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 "chromecast/media/cdm/cast_cdm_proxy.h" 5 #include "chromecast/media/cdm/cast_cdm_proxy.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 21 matching lines...) Expand all
32 if (IsPromiseSettled()) 32 if (IsPromiseSettled())
33 return; 33 return;
34 34
35 DCHECK(promise_); 35 DCHECK(promise_);
36 RejectPromiseOnDestruction(); 36 RejectPromiseOnDestruction();
37 } 37 }
38 38
39 // CdmPromiseTemplate<> implementation. 39 // CdmPromiseTemplate<> implementation.
40 void resolve(const T&... result) final; 40 void resolve(const T&... result) final;
41 41
42 void reject(::media::MediaKeys::Exception exception, 42 void reject(::media::CdmPromise::Exception exception,
43 uint32_t system_code, 43 uint32_t system_code,
44 const std::string& error_message) final { 44 const std::string& error_message) final {
45 MarkPromiseSettled(); 45 MarkPromiseSettled();
46 task_runner_->PostTask( 46 task_runner_->PostTask(
47 FROM_HERE, base::Bind(&::media::CdmPromiseTemplate<T...>::reject, 47 FROM_HERE, base::Bind(&::media::CdmPromiseTemplate<T...>::reject,
48 base::Owned(promise_.release()), exception, 48 base::Owned(promise_.release()), exception,
49 system_code, error_message)); 49 system_code, error_message));
50 } 50 }
51 51
52 private: 52 private:
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 158
159 ::media::CdmContext* CastCdmProxy::GetCdmContext() { 159 ::media::CdmContext* CastCdmProxy::GetCdmContext() {
160 // This will be recast as a CastCdmService pointer before being passed to the 160 // This will be recast as a CastCdmService pointer before being passed to the
161 // media pipeline. The returned object should only be called on the CMA 161 // media pipeline. The returned object should only be called on the CMA
162 // renderer thread. 162 // renderer thread.
163 return cast_cdm_->GetCdmContext(); 163 return cast_cdm_->GetCdmContext();
164 } 164 }
165 165
166 } // namespace media 166 } // namespace media
167 } // namespace chromecast 167 } // namespace chromecast
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/cdm/ppapi_decryptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698