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

Side by Side Diff: content/renderer/media/android/renderer_media_player_manager.h

Issue 193523002: Encrypted Media: Implement IPC based SetCdm(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments addressed Created 6 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 | Annotate | Revision Log
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_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_
6 #define CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_ 6 #define CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 17 matching lines...) Expand all
28 28
29 namespace content { 29 namespace content {
30 30
31 class ProxyMediaKeys; 31 class ProxyMediaKeys;
32 class WebMediaPlayerAndroid; 32 class WebMediaPlayerAndroid;
33 33
34 // Class for managing all the WebMediaPlayerAndroid objects in the same 34 // Class for managing all the WebMediaPlayerAndroid objects in the same
35 // RenderView. 35 // RenderView.
36 class RendererMediaPlayerManager : public RenderViewObserver { 36 class RendererMediaPlayerManager : public RenderViewObserver {
37 public: 37 public:
38 static const int kInvalidCdmId = 0;
39
38 // Constructs a RendererMediaPlayerManager object for the |render_view|. 40 // Constructs a RendererMediaPlayerManager object for the |render_view|.
39 RendererMediaPlayerManager(RenderView* render_view); 41 RendererMediaPlayerManager(RenderView* render_view);
40 virtual ~RendererMediaPlayerManager(); 42 virtual ~RendererMediaPlayerManager();
41 43
42 // RenderViewObserver overrides. 44 // RenderViewObserver overrides.
43 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; 45 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
44 46
45 // Initializes a MediaPlayerAndroid object in browser process. 47 // Initializes a MediaPlayerAndroid object in browser process.
46 void Initialize(MediaPlayerHostMsg_Initialize_Type type, 48 void Initialize(MediaPlayerHostMsg_Initialize_Type type,
47 int player_id, 49 int player_id,
(...skipping 25 matching lines...) Expand all
73 75
74 // Destroys the player in the browser process 76 // Destroys the player in the browser process
75 void DestroyPlayer(int player_id); 77 void DestroyPlayer(int player_id);
76 78
77 // Requests the player to enter fullscreen. 79 // Requests the player to enter fullscreen.
78 void EnterFullscreen(int player_id, blink::WebFrame* frame); 80 void EnterFullscreen(int player_id, blink::WebFrame* frame);
79 81
80 // Requests the player to exit fullscreen. 82 // Requests the player to exit fullscreen.
81 void ExitFullscreen(int player_id); 83 void ExitFullscreen(int player_id);
82 84
85 // Requests the player with |player_id| to use the CDM with |cdm_id|.
86 // Does nothing if |cdm_id| is kInvalidCdmId.
ddorwin 2014/03/25 23:03:59 Why? Shouldn't it detach the two? (Equivalent to s
xhwang 2014/03/26 06:02:04 No, we don't support setMediaKeys(0). Currently we
87 void SetCdm(int player_id, int cdm_id);
88
83 #if defined(VIDEO_HOLE) 89 #if defined(VIDEO_HOLE)
84 // Requests an external surface for out-of-band compositing. 90 // Requests an external surface for out-of-band compositing.
85 void RequestExternalSurface(int player_id, const gfx::RectF& geometry); 91 void RequestExternalSurface(int player_id, const gfx::RectF& geometry);
86 92
87 // RenderViewObserver overrides. 93 // RenderViewObserver overrides.
88 virtual void DidCommitCompositorFrame() OVERRIDE; 94 virtual void DidCommitCompositorFrame() OVERRIDE;
89 #endif // defined(VIDEO_HOLE) 95 #endif // defined(VIDEO_HOLE)
90 96
91 // Encrypted media related methods. 97 // Encrypted media related methods.
92 void InitializeCdm(int cdm_id, 98 void InitializeCdm(int cdm_id,
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 199
194 // WebFrame of pending fullscreen request. 200 // WebFrame of pending fullscreen request.
195 blink::WebFrame* pending_fullscreen_frame_; 201 blink::WebFrame* pending_fullscreen_frame_;
196 202
197 DISALLOW_COPY_AND_ASSIGN(RendererMediaPlayerManager); 203 DISALLOW_COPY_AND_ASSIGN(RendererMediaPlayerManager);
198 }; 204 };
199 205
200 } // namespace content 206 } // namespace content
201 207
202 #endif // CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_ 208 #endif // CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698