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

Side by Side Diff: media/mojo/services/mojo_cdm_service.cc

Issue 1527183003: Change mojo enums to be scoped enums in the generated C++ bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-binding-equals
Patch Set: rebase Created 4 years, 11 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/mojo/services/media_type_converters.cc ('k') | media/mojo/services/mojo_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 "media/mojo/services/mojo_cdm_service.h" 5 #include "media/mojo/services/mojo_cdm_service.h"
6 6
7 #include <map> 7 #include <map>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 const scoped_refptr<MediaKeys>& cdm, 187 const scoped_refptr<MediaKeys>& cdm,
188 const std::string& error_message) { 188 const std::string& error_message) {
189 interfaces::CdmPromiseResultPtr cdm_promise_result( 189 interfaces::CdmPromiseResultPtr cdm_promise_result(
190 interfaces::CdmPromiseResult::New()); 190 interfaces::CdmPromiseResult::New());
191 191
192 // TODO(xhwang): This should not happen when KeySystemInfo is properly 192 // TODO(xhwang): This should not happen when KeySystemInfo is properly
193 // populated. See http://crbug.com/469366 193 // populated. See http://crbug.com/469366
194 if (!cdm || !context_) { 194 if (!cdm || !context_) {
195 cdm_promise_result->success = false; 195 cdm_promise_result->success = false;
196 cdm_promise_result->exception = 196 cdm_promise_result->exception =
197 interfaces::CDM_EXCEPTION_NOT_SUPPORTED_ERROR; 197 interfaces::CdmException::NOT_SUPPORTED_ERROR;
198 cdm_promise_result->system_code = 0; 198 cdm_promise_result->system_code = 0;
199 cdm_promise_result->error_message = error_message; 199 cdm_promise_result->error_message = error_message;
200 callback.Run(std::move(cdm_promise_result), 0, nullptr); 200 callback.Run(std::move(cdm_promise_result), 0, nullptr);
201 return; 201 return;
202 } 202 }
203 203
204 cdm_ = cdm; 204 cdm_ = cdm;
205 cdm_id_ = next_cdm_id_++; 205 cdm_id_ = next_cdm_id_++;
206 206
207 context_->RegisterCdm(cdm_id_, this); 207 context_->RegisterCdm(cdm_id_, this);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 274
275 void MojoCdmService::OnDecryptorConnectionError() { 275 void MojoCdmService::OnDecryptorConnectionError() {
276 DVLOG(2) << __FUNCTION__; 276 DVLOG(2) << __FUNCTION__;
277 277
278 // MojoDecryptorService has lost connectivity to it's client, so it can be 278 // MojoDecryptorService has lost connectivity to it's client, so it can be
279 // freed. 279 // freed.
280 decryptor_.reset(); 280 decryptor_.reset();
281 } 281 }
282 282
283 } // namespace media 283 } // namespace media
OLDNEW
« no previous file with comments | « media/mojo/services/media_type_converters.cc ('k') | media/mojo/services/mojo_decryptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698