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: content/renderer/media/crypto/content_decryption_module_factory.h

Issue 660673002: Introduce CdmFactory interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_result_promise
Patch Set: comments addressed Created 6 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_RENDERER_MEDIA_CRYPTO_CONTENT_DECRYPTION_MODULE_FACTORY_H_
6 #define CONTENT_RENDERER_MEDIA_CRYPTO_CONTENT_DECRYPTION_MODULE_FACTORY_H_
7
8 #include <string>
9
10 #include "base/memory/scoped_ptr.h"
11 #include "media/base/media_keys.h"
12
13 #if defined(ENABLE_PEPPER_CDMS)
14 #include "content/renderer/media/crypto/pepper_cdm_wrapper.h"
15 #endif
16
17 class GURL;
18
19 namespace content {
20
21 #if defined(ENABLE_BROWSER_CDMS)
22 class RendererCdmManager;
23 #endif
24
25 class ContentDecryptionModuleFactory {
26 public:
27 // |create_pepper_cdm_cb| will be called synchronously if necessary. The other
28 // callbacks can be called asynchronously.
29 static scoped_ptr<media::MediaKeys> Create(
30 const std::string& key_system,
31 const GURL& security_origin,
32 #if defined(ENABLE_PEPPER_CDMS)
33 const CreatePepperCdmCB& create_pepper_cdm_cb,
34 #elif defined(ENABLE_BROWSER_CDMS)
35 RendererCdmManager* manager,
36 int* cdm_id, // Output parameter indicating the CDM ID of the MediaKeys.
37 #endif // defined(ENABLE_PEPPER_CDMS)
38 const media::SessionMessageCB& session_message_cb,
39 const media::SessionReadyCB& session_ready_cb,
40 const media::SessionClosedCB& session_closed_cb,
41 const media::SessionErrorCB& session_error_cb,
42 const media::SessionKeysChangeCB& session_keys_change_cb,
43 const media::SessionExpirationUpdateCB& session_expiration_update_cb);
44 };
45
46 } // namespace content
47
48 #endif // CONTENT_RENDERER_MEDIA_CRYPTO_CONTENT_DECRYPTION_MODULE_FACTORY_H_
OLDNEW
« no previous file with comments | « content/renderer/media/cdm_session_adapter.cc ('k') | content/renderer/media/crypto/content_decryption_module_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698