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

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

Issue 105743004: Add gpu::MailboxHolder to hold state for a gpu::Mailbox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: bfbc08f8 Android clang fixes. Created 6 years, 11 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_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 <jni.h> 8 #include <jni.h>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 13 matching lines...) Expand all
24 #include "gpu/command_buffer/common/mailbox.h" 24 #include "gpu/command_buffer/common/mailbox.h"
25 #include "media/base/android/media_player_android.h" 25 #include "media/base/android/media_player_android.h"
26 #include "media/base/demuxer_stream.h" 26 #include "media/base/demuxer_stream.h"
27 #include "media/base/media_keys.h" 27 #include "media/base/media_keys.h"
28 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" 28 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h"
29 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" 29 #include "third_party/WebKit/public/platform/WebMediaPlayer.h"
30 #include "third_party/WebKit/public/platform/WebSize.h" 30 #include "third_party/WebKit/public/platform/WebSize.h"
31 #include "third_party/WebKit/public/platform/WebURL.h" 31 #include "third_party/WebKit/public/platform/WebURL.h"
32 #include "ui/gfx/rect_f.h" 32 #include "ui/gfx/rect_f.h"
33 33
34 namespace blink {
35 class WebFrame;
36 }
37
38 namespace gpu {
39 struct MailboxHolder;
40 }
41
34 namespace media { 42 namespace media {
35 class MediaLog; 43 class MediaLog;
36 } 44 }
37 45
38 namespace blink {
39 class WebFrame;
40 }
41
42 namespace webkit { 46 namespace webkit {
43 class WebLayerImpl; 47 class WebLayerImpl;
44 } 48 }
45 49
46 namespace content { 50 namespace content {
47 class WebMediaPlayerDelegate; 51 class WebMediaPlayerDelegate;
48 class RendererMediaPlayerManager; 52 class RendererMediaPlayerManager;
49 53
50 // This class implements blink::WebMediaPlayer by keeping the android 54 // This class implements blink::WebMediaPlayer by keeping the android
51 // media player in the browser process. It listens to all the status changes 55 // media player in the browser process. It listens to all the status changes
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 220
217 void OnMediaSourceOpened(blink::WebMediaSource* web_media_source); 221 void OnMediaSourceOpened(blink::WebMediaSource* web_media_source);
218 222
219 void OnNeedKey(const std::string& type, 223 void OnNeedKey(const std::string& type,
220 const std::vector<uint8>& init_data); 224 const std::vector<uint8>& init_data);
221 225
222 // Can be called on any thread. 226 // Can be called on any thread.
223 static void OnReleaseRemotePlaybackTexture( 227 static void OnReleaseRemotePlaybackTexture(
224 const scoped_refptr<base::MessageLoopProxy>& main_loop, 228 const scoped_refptr<base::MessageLoopProxy>& main_loop,
225 const base::WeakPtr<WebMediaPlayerAndroid>& player, 229 const base::WeakPtr<WebMediaPlayerAndroid>& player,
226 uint32 sync_point); 230 const gpu::MailboxHolder* mailbox_holder);
227 231
228 protected: 232 protected:
229 // Helper method to update the playing state. 233 // Helper method to update the playing state.
230 void UpdatePlayingState(bool is_playing_); 234 void UpdatePlayingState(bool is_playing_);
231 235
232 // Helper methods for posting task for setting states and update WebKit. 236 // Helper methods for posting task for setting states and update WebKit.
233 void UpdateNetworkState(blink::WebMediaPlayer::NetworkState state); 237 void UpdateNetworkState(blink::WebMediaPlayer::NetworkState state);
234 void UpdateReadyState(blink::WebMediaPlayer::ReadyState state); 238 void UpdateReadyState(blink::WebMediaPlayer::ReadyState state);
235 void TryCreateStreamTextureProxyIfNeeded(); 239 void TryCreateStreamTextureProxyIfNeeded();
236 void DoCreateStreamTexture(); 240 void DoCreateStreamTexture();
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 scoped_ptr<ProxyDecryptor> decryptor_; 427 scoped_ptr<ProxyDecryptor> decryptor_;
424 428
425 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; 429 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_;
426 430
427 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); 431 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid);
428 }; 432 };
429 433
430 } // namespace content 434 } // namespace content
431 435
432 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ 436 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698