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

Side by Side Diff: content/browser/media/android/browser_media_player_manager.h

Issue 302453012: Support casting for embedded YT videos (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merged parameters into struct to avoid 2 IPC calls, updated nits Created 6 years, 6 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_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ 5 #ifndef CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_
6 #define CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ 6 #define CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 11 matching lines...) Expand all
22 #include "media/base/android/media_player_android.h" 22 #include "media/base/android/media_player_android.h"
23 #include "media/base/android/media_player_manager.h" 23 #include "media/base/android/media_player_manager.h"
24 #include "ui/gfx/rect_f.h" 24 #include "ui/gfx/rect_f.h"
25 #include "url/gurl.h" 25 #include "url/gurl.h"
26 26
27 namespace media { 27 namespace media {
28 class DemuxerAndroid; 28 class DemuxerAndroid;
29 class MediaKeys; 29 class MediaKeys;
30 } 30 }
31 31
32 struct MediaPlayerHostMsg_Initialize_Params;
33
32 namespace content { 34 namespace content {
33 class BrowserDemuxerAndroid; 35 class BrowserDemuxerAndroid;
34 class ContentViewCoreImpl; 36 class ContentViewCoreImpl;
35 class ExternalVideoSurfaceContainer; 37 class ExternalVideoSurfaceContainer;
36 class WebContents; 38 class WebContents;
37 39
38 // This class manages all the MediaPlayerAndroid and CDM objects. 40 // This class manages all the MediaPlayerAndroid and CDM objects.
39 // It receives control operations from the the render process, and forwards 41 // It receives control operations from the the render process, and forwards
40 // them to corresponding MediaPlayerAndroid or CDM object. Callbacks from 42 // them to corresponding MediaPlayerAndroid or CDM object. Callbacks from
41 // MediaPlayerAndroid and CDM objects are converted to IPCs and then sent to 43 // MediaPlayerAndroid and CDM objects are converted to IPCs and then sent to
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 #endif // defined(VIDEO_HOLE) 116 #endif // defined(VIDEO_HOLE)
115 117
116 protected: 118 protected:
117 // Clients must use Create() or subclass constructor. 119 // Clients must use Create() or subclass constructor.
118 explicit BrowserMediaPlayerManager(RenderViewHost* render_view_host); 120 explicit BrowserMediaPlayerManager(RenderViewHost* render_view_host);
119 121
120 // Message handlers. 122 // Message handlers.
121 virtual void OnEnterFullscreen(int player_id); 123 virtual void OnEnterFullscreen(int player_id);
122 virtual void OnExitFullscreen(int player_id); 124 virtual void OnExitFullscreen(int player_id);
123 virtual void OnInitialize( 125 virtual void OnInitialize(
124 MediaPlayerHostMsg_Initialize_Type type, 126 MediaPlayerHostMsg_Initialize_Type type,
acolwell GONE FROM CHROMIUM 2014/06/09 20:02:09 nit: Any reason why this can't go in the params st
May 2014/06/10 18:22:19 No real reason, just preference. merged it in the
125 int player_id, 127 const MediaPlayerHostMsg_Initialize_Params& media_player_params);
126 const GURL& url,
127 const GURL& first_party_for_cookies,
128 int demuxer_client_id);
129 virtual void OnStart(int player_id); 128 virtual void OnStart(int player_id);
130 virtual void OnSeek(int player_id, const base::TimeDelta& time); 129 virtual void OnSeek(int player_id, const base::TimeDelta& time);
131 virtual void OnPause(int player_id, bool is_media_related_action); 130 virtual void OnPause(int player_id, bool is_media_related_action);
132 virtual void OnSetVolume(int player_id, double volume); 131 virtual void OnSetVolume(int player_id, double volume);
133 virtual void OnSetPoster(int player_id, const GURL& poster); 132 virtual void OnSetPoster(int player_id, const GURL& poster);
134 virtual void OnReleaseResources(int player_id); 133 virtual void OnReleaseResources(int player_id);
135 virtual void OnDestroyPlayer(int player_id); 134 virtual void OnDestroyPlayer(int player_id);
136 virtual void ReleaseFullscreenPlayer(media::MediaPlayerAndroid* player); 135 virtual void ReleaseFullscreenPlayer(media::MediaPlayerAndroid* player);
137 void OnInitializeCdm(int cdm_id, 136 void OnInitializeCdm(int cdm_id,
138 const std::string& key_system, 137 const std::string& key_system,
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 250
252 // NOTE: Weak pointers must be invalidated before all other member variables. 251 // NOTE: Weak pointers must be invalidated before all other member variables.
253 base::WeakPtrFactory<BrowserMediaPlayerManager> weak_ptr_factory_; 252 base::WeakPtrFactory<BrowserMediaPlayerManager> weak_ptr_factory_;
254 253
255 DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManager); 254 DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManager);
256 }; 255 };
257 256
258 } // namespace content 257 } // namespace content
259 258
260 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ 259 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698