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

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

Issue 1877753003: Move mojo\shell to services\shell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@62scan
Patch Set: . Created 4 years, 8 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_apptest.cc ('k') | media/mojo/services/mojo_cdm_factory.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.h" 5 #include "media/mojo/services/mojo_cdm.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/bind_helpers.h" 12 #include "base/bind_helpers.h"
13 #include "base/location.h" 13 #include "base/location.h"
14 #include "base/single_thread_task_runner.h" 14 #include "base/single_thread_task_runner.h"
15 #include "base/thread_task_runner_handle.h" 15 #include "base/thread_task_runner_handle.h"
16 #include "media/base/cdm_context.h" 16 #include "media/base/cdm_context.h"
17 #include "media/base/cdm_key_information.h" 17 #include "media/base/cdm_key_information.h"
18 #include "media/base/cdm_promise.h" 18 #include "media/base/cdm_promise.h"
19 #include "media/mojo/common/media_type_converters.h" 19 #include "media/mojo/common/media_type_converters.h"
20 #include "media/mojo/interfaces/decryptor.mojom.h" 20 #include "media/mojo/interfaces/decryptor.mojom.h"
21 #include "media/mojo/services/mojo_decryptor.h" 21 #include "media/mojo/services/mojo_decryptor.h"
22 #include "mojo/shell/public/cpp/connect.h" 22 #include "services/shell/public/cpp/connect.h"
23 #include "mojo/shell/public/interfaces/interface_provider.mojom.h" 23 #include "services/shell/public/interfaces/interface_provider.mojom.h"
24 #include "url/gurl.h" 24 #include "url/gurl.h"
25 25
26 namespace media { 26 namespace media {
27 27
28 template <typename PromiseType> 28 template <typename PromiseType>
29 static void RejectPromise(std::unique_ptr<PromiseType> promise, 29 static void RejectPromise(std::unique_ptr<PromiseType> promise,
30 interfaces::CdmPromiseResultPtr result) { 30 interfaces::CdmPromiseResultPtr result) {
31 promise->reject(static_cast<MediaKeys::Exception>(result->exception), 31 promise->reject(static_cast<MediaKeys::Exception>(result->exception),
32 result->system_code, result->error_message); 32 result->system_code, result->error_message);
33 } 33 }
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 base::AutoLock auto_lock(lock_); 346 base::AutoLock auto_lock(lock_);
347 347
348 DCHECK(decryptor_task_runner_); 348 DCHECK(decryptor_task_runner_);
349 DCHECK(decryptor_task_runner_->BelongsToCurrentThread()); 349 DCHECK(decryptor_task_runner_->BelongsToCurrentThread());
350 DCHECK(decryptor_); 350 DCHECK(decryptor_);
351 351
352 decryptor_->OnKeyAdded(); 352 decryptor_->OnKeyAdded();
353 } 353 }
354 354
355 } // namespace media 355 } // namespace media
OLDNEW
« no previous file with comments | « media/mojo/services/media_apptest.cc ('k') | media/mojo/services/mojo_cdm_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698