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

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

Issue 1844843002: android: Remove in-process video path (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove commented out code + rebase again Created 4 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
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_WEBMEDIAPLAYER_ANDROID_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_
6 #define CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ 6 #define CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 class RendererMediaPlayerManager; 73 class RendererMediaPlayerManager;
74 74
75 // This class implements blink::WebMediaPlayer by keeping the android 75 // This class implements blink::WebMediaPlayer by keeping the android
76 // media player in the browser process. It listens to all the status changes 76 // media player in the browser process. It listens to all the status changes
77 // sent from the browser process and sends playback controls to the media 77 // sent from the browser process and sends playback controls to the media
78 // player. 78 // player.
79 class WebMediaPlayerAndroid 79 class WebMediaPlayerAndroid
80 : public blink::WebMediaPlayer, 80 : public blink::WebMediaPlayer,
81 public cc::VideoFrameProvider, 81 public cc::VideoFrameProvider,
82 public StreamTextureFactoryContextObserver,
83 public media::RendererMediaPlayerInterface, 82 public media::RendererMediaPlayerInterface,
84 public NON_EXPORTED_BASE(media::WebMediaPlayerDelegate::Observer) { 83 public NON_EXPORTED_BASE(media::WebMediaPlayerDelegate::Observer) {
85 public: 84 public:
86 // Construct a WebMediaPlayerAndroid object. This class communicates with the 85 // Construct a WebMediaPlayerAndroid object. This class communicates with the
87 // MediaPlayerAndroid object in the browser process through |proxy|. 86 // MediaPlayerAndroid object in the browser process through |proxy|.
88 // TODO(qinmin): |frame| argument is used to determine whether the current 87 // TODO(qinmin): |frame| argument is used to determine whether the current
89 // player can enter fullscreen. This logic should probably be moved into 88 // player can enter fullscreen. This logic should probably be moved into
90 // blink, so that enteredFullscreen() will not be called if another video is 89 // blink, so that enteredFullscreen() will not be called if another video is
91 // already in fullscreen. 90 // already in fullscreen.
92 WebMediaPlayerAndroid( 91 WebMediaPlayerAndroid(
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 // Functions called when media player status changes. 207 // Functions called when media player status changes.
209 void OnConnectedToRemoteDevice(const std::string& remote_playback_message) 208 void OnConnectedToRemoteDevice(const std::string& remote_playback_message)
210 override; 209 override;
211 void OnDisconnectedFromRemoteDevice() override; 210 void OnDisconnectedFromRemoteDevice() override;
212 void OnCancelledRemotePlaybackRequest() override; 211 void OnCancelledRemotePlaybackRequest() override;
213 void OnDidExitFullscreen() override; 212 void OnDidExitFullscreen() override;
214 void OnMediaPlayerPlay() override; 213 void OnMediaPlayerPlay() override;
215 void OnMediaPlayerPause() override; 214 void OnMediaPlayerPause() override;
216 void OnRemoteRouteAvailabilityChanged(bool routes_available) override; 215 void OnRemoteRouteAvailabilityChanged(bool routes_available) override;
217 216
218 // StreamTextureFactoryContextObserver implementation.
219 void ResetStreamTextureProxy() override;
220
221 // Called when the player is released. 217 // Called when the player is released.
222 void OnPlayerReleased() override; 218 void OnPlayerReleased() override;
223 219
224 // This function is called by the RendererMediaPlayerManager to pause the 220 // This function is called by the RendererMediaPlayerManager to pause the
225 // video and release the media player and surface texture when we switch tabs. 221 // video and release the media player and surface texture when we switch tabs.
226 // However, the actual GlTexture is not released to keep the video screenshot. 222 // However, the actual GlTexture is not released to keep the video screenshot.
227 void SuspendAndReleaseResources() override; 223 void SuspendAndReleaseResources() override;
228 224
229 #if defined(VIDEO_HOLE) 225 #if defined(VIDEO_HOLE)
230 // Calculate the boundary rectangle of the media player (i.e. location and 226 // Calculate the boundary rectangle of the media player (i.e. location and
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 515
520 // NOTE: Weak pointers must be invalidated before all other member variables. 516 // NOTE: Weak pointers must be invalidated before all other member variables.
521 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; 517 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_;
522 518
523 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); 519 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid);
524 }; 520 };
525 521
526 } // namespace content 522 } // namespace content
527 523
528 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ 524 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698