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

Side by Side Diff: content/renderer/media/cdm/render_cdm_factory.h

Issue 2380743004: media: Remove Browser CDM implementation (Closed)
Patch Set: media: Remove Browser CDM implementation Created 4 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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 #ifndef CONTENT_RENDERER_MEDIA_CDM_RENDER_CDM_FACTORY_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_CDM_RENDER_CDM_FACTORY_H_
6 #define CONTENT_RENDERER_MEDIA_CDM_RENDER_CDM_FACTORY_H_ 6 #define CONTENT_RENDERER_MEDIA_CDM_RENDER_CDM_FACTORY_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/threading/thread_checker.h" 12 #include "base/threading/thread_checker.h"
13 #include "media/base/cdm_factory.h" 13 #include "media/base/cdm_factory.h"
14 #include "media/base/media_keys.h" 14 #include "media/base/media_keys.h"
15 15
16 #if defined(ENABLE_PEPPER_CDMS) 16 #if defined(ENABLE_PEPPER_CDMS)
17 #include "content/renderer/media/cdm/pepper_cdm_wrapper.h" 17 #include "content/renderer/media/cdm/pepper_cdm_wrapper.h"
18 #endif 18 #endif
19 19
20 class GURL; 20 class GURL;
21 21
22 namespace media { 22 namespace media {
23 struct CdmConfig; 23 struct CdmConfig;
24 } // namespace media 24 } // namespace media
25 25
26 namespace content { 26 namespace content {
27 27
28 #if defined(ENABLE_BROWSER_CDMS)
29 class RendererCdmManager;
30 #endif
31
32 // CdmFactory implementation in content/renderer. This class is not thread safe 28 // CdmFactory implementation in content/renderer. This class is not thread safe
33 // and should only be used on one thread. 29 // and should only be used on one thread.
34 class RenderCdmFactory : public media::CdmFactory { 30 class RenderCdmFactory : public media::CdmFactory {
35 public: 31 public:
36 #if defined(ENABLE_PEPPER_CDMS) 32 #if defined(ENABLE_PEPPER_CDMS)
37 explicit RenderCdmFactory(const CreatePepperCdmCB& create_pepper_cdm_cb); 33 explicit RenderCdmFactory(const CreatePepperCdmCB& create_pepper_cdm_cb);
38 #elif defined(ENABLE_BROWSER_CDMS)
39 explicit RenderCdmFactory(RendererCdmManager* manager);
40 #else 34 #else
41 RenderCdmFactory(); 35 RenderCdmFactory();
42 #endif // defined(ENABLE_PEPPER_CDMS) 36 #endif // defined(ENABLE_PEPPER_CDMS)
DaleCurtis 2016/09/30 16:42:29 Can this one go away soon too? :)
xhwang 2016/09/30 17:06:19 Depending on how you define "soon" :) Yes, this is
43 37
44 ~RenderCdmFactory() override; 38 ~RenderCdmFactory() override;
45 39
46 // CdmFactory implementation. 40 // CdmFactory implementation.
47 void Create( 41 void Create(
48 const std::string& key_system, 42 const std::string& key_system,
49 const GURL& security_origin, 43 const GURL& security_origin,
50 const media::CdmConfig& cdm_config, 44 const media::CdmConfig& cdm_config,
51 const media::SessionMessageCB& session_message_cb, 45 const media::SessionMessageCB& session_message_cb,
52 const media::SessionClosedCB& session_closed_cb, 46 const media::SessionClosedCB& session_closed_cb,
53 const media::SessionKeysChangeCB& session_keys_change_cb, 47 const media::SessionKeysChangeCB& session_keys_change_cb,
54 const media::SessionExpirationUpdateCB& session_expiration_update_cb, 48 const media::SessionExpirationUpdateCB& session_expiration_update_cb,
55 const media::CdmCreatedCB& cdm_created_cb) override; 49 const media::CdmCreatedCB& cdm_created_cb) override;
56 50
57 private: 51 private:
58 #if defined(ENABLE_PEPPER_CDMS) 52 #if defined(ENABLE_PEPPER_CDMS)
59 CreatePepperCdmCB create_pepper_cdm_cb_; 53 CreatePepperCdmCB create_pepper_cdm_cb_;
60 #elif defined(ENABLE_BROWSER_CDMS)
61 // The |manager_| is a per render frame object owned by RenderFrameImpl.
62 RendererCdmManager* manager_;
63 #endif 54 #endif
64 55
65 base::ThreadChecker thread_checker_; 56 base::ThreadChecker thread_checker_;
66 57
67 DISALLOW_COPY_AND_ASSIGN(RenderCdmFactory); 58 DISALLOW_COPY_AND_ASSIGN(RenderCdmFactory);
68 }; 59 };
69 60
70 } // namespace content 61 } // namespace content
71 62
72 #endif // CONTENT_RENDERER_MEDIA_CDM_RENDER_CDM_FACTORY_H_ 63 #endif // CONTENT_RENDERER_MEDIA_CDM_RENDER_CDM_FACTORY_H_
OLDNEW
« no previous file with comments | « content/renderer/media/cdm/proxy_media_keys.cc ('k') | content/renderer/media/cdm/render_cdm_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698