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

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

Issue 665563002: Add MediaKeys::GetCdmId(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: Make GetCdmId() pure virtual. 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
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 #ifndef CONTENT_RENDERER_MEDIA_CRYPTO_RENDERER_CDM_MANAGER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_CRYPTO_RENDERER_CDM_MANAGER_H_
6 #define CONTENT_RENDERER_MEDIA_CRYPTO_RENDERER_CDM_MANAGER_H_ 6 #define CONTENT_RENDERER_MEDIA_CRYPTO_RENDERER_CDM_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "content/common/media/cdm_messages_enums.h" 13 #include "content/common/media/cdm_messages_enums.h"
14 #include "content/public/renderer/render_frame_observer.h" 14 #include "content/public/renderer/render_frame_observer.h"
15 #include "media/base/media_keys.h" 15 #include "media/base/media_keys.h"
16 #include "url/gurl.h" 16 #include "url/gurl.h"
17 17
18 namespace blink { 18 namespace blink {
19 class WebFrame; 19 class WebFrame;
20 } 20 }
21 21
22 namespace content { 22 namespace content {
23 23
24 class ProxyMediaKeys; 24 class ProxyMediaKeys;
25 25
26 // Class for managing all the CDM objects in the same RenderFrame. 26 // Class for managing all the CDM objects in the same RenderFrame.
27 class RendererCdmManager : public RenderFrameObserver { 27 class RendererCdmManager : public RenderFrameObserver {
28 public: 28 public:
29 static const int kInvalidCdmId = 0;
30
31 // Constructs a RendererCdmManager object for the |render_frame|. 29 // Constructs a RendererCdmManager object for the |render_frame|.
32 explicit RendererCdmManager(RenderFrame* render_frame); 30 explicit RendererCdmManager(RenderFrame* render_frame);
33 virtual ~RendererCdmManager(); 31 virtual ~RendererCdmManager();
34 32
35 // RenderFrameObserver overrides. 33 // RenderFrameObserver overrides.
36 virtual bool OnMessageReceived(const IPC::Message& msg) override; 34 virtual bool OnMessageReceived(const IPC::Message& msg) override;
37 35
38 // Encrypted media related methods. 36 // Encrypted media related methods.
39 void InitializeCdm(int cdm_id, 37 void InitializeCdm(int cdm_id,
40 ProxyMediaKeys* media_keys, 38 ProxyMediaKeys* media_keys,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 79
82 // CDM ID to ProxyMediaKeys mapping. 80 // CDM ID to ProxyMediaKeys mapping.
83 std::map<int, ProxyMediaKeys*> proxy_media_keys_map_; 81 std::map<int, ProxyMediaKeys*> proxy_media_keys_map_;
84 82
85 DISALLOW_COPY_AND_ASSIGN(RendererCdmManager); 83 DISALLOW_COPY_AND_ASSIGN(RendererCdmManager);
86 }; 84 };
87 85
88 } // namespace content 86 } // namespace content
89 87
90 #endif // CONTENT_RENDERER_MEDIA_CRYPTO_RENDERER_CDM_MANAGER_H_ 88 #endif // CONTENT_RENDERER_MEDIA_CRYPTO_RENDERER_CDM_MANAGER_H_
OLDNEW
« no previous file with comments | « content/renderer/media/crypto/render_cdm_factory.cc ('k') | content/renderer/media/crypto/renderer_cdm_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698