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

Side by Side Diff: content/renderer/media/crypto/cdm_initialized_promise.h

Issue 1102363005: Initialize the CDM asynchronously (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase + Android compile changes Created 5 years, 7 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 | « content/content_renderer.gypi ('k') | content/renderer/media/crypto/cdm_initialized_promise.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_RENDERER_MEDIA_CRYPTO_CDM_INITIALIZED_PROMISE_H_
6 #define CONTENT_RENDERER_MEDIA_CRYPTO_CDM_INITIALIZED_PROMISE_H_
7
8 #include <string>
9
10 #include "base/memory/scoped_ptr.h"
11 #include "media/base/cdm_factory.h"
12 #include "media/base/cdm_promise.h"
13 #include "media/base/media_keys.h"
14
15 namespace content {
16
17 // Promise to be resolved when the CDM is initialized. It owns the MediaKeys
18 // object until the initialization completes, which it then passes to
19 // |cdm_created_cb|.
20 class CdmInitializedPromise : public media::SimpleCdmPromise {
21 public:
22 CdmInitializedPromise(const media::CdmCreatedCB& cdm_created_cb,
23 scoped_ptr<media::MediaKeys> cdm);
24 ~CdmInitializedPromise() override;
25
26 // SimpleCdmPromise implementation.
27 void resolve() override;
28 void reject(media::MediaKeys::Exception exception_code,
29 uint32 system_code,
30 const std::string& error_message) override;
31
32 private:
33 media::CdmCreatedCB cdm_created_cb_;
34 scoped_ptr<media::MediaKeys> cdm_;
35 };
36
37 } // namespace content
38
39 #endif // CONTENT_RENDERER_MEDIA_CRYPTO_CDM_INITIALIZED_PROMISE_H_
OLDNEW
« no previous file with comments | « content/content_renderer.gypi ('k') | content/renderer/media/crypto/cdm_initialized_promise.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698