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

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

Issue 132233041: Add gpu::MailboxHolder to hold state for a gpu::Mailbox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ff7262fa Rebase. Created 6 years, 10 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 17 matching lines...) Expand all
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 base { 34 namespace base {
35 class MessageLoopProxy; 35 class MessageLoopProxy;
36 } 36 }
37 37
38 namespace blink {
39 class WebFrame;
40 }
41
42 namespace gpu {
43 struct MailboxHolder;
44 }
45
38 namespace media { 46 namespace media {
39 class MediaLog; 47 class MediaLog;
40 } 48 }
41 49
42 namespace blink {
43 class WebFrame;
44 }
45
46 namespace webkit { 50 namespace webkit {
47 class WebLayerImpl; 51 class WebLayerImpl;
48 } 52 }
49 53
50 namespace content { 54 namespace content {
51 class WebMediaPlayerDelegate; 55 class WebMediaPlayerDelegate;
52 class RendererMediaPlayerManager; 56 class RendererMediaPlayerManager;
53 57
54 // This class implements blink::WebMediaPlayer by keeping the android 58 // This class implements blink::WebMediaPlayer by keeping the android
55 // media player in the browser process. It listens to all the status changes 59 // 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
220 void OnNeedKey(const std::string& type, 224 void OnNeedKey(const std::string& type,
221 const std::vector<uint8>& init_data); 225 const std::vector<uint8>& init_data);
222 226
223 // TODO(xhwang): Implement WebMediaPlayer::setContentDecryptionModule(). 227 // TODO(xhwang): Implement WebMediaPlayer::setContentDecryptionModule().
224 // See: http://crbug.com/224786 228 // See: http://crbug.com/224786
225 229
226 // Can be called on any thread. 230 // Can be called on any thread.
227 static void OnReleaseRemotePlaybackTexture( 231 static void OnReleaseRemotePlaybackTexture(
228 const scoped_refptr<base::MessageLoopProxy>& main_loop, 232 const scoped_refptr<base::MessageLoopProxy>& main_loop,
229 const base::WeakPtr<WebMediaPlayerAndroid>& player, 233 const base::WeakPtr<WebMediaPlayerAndroid>& player,
230 uint32 sync_point); 234 scoped_ptr<gpu::MailboxHolder> mailbox_holder);
231 235
232 protected: 236 protected:
233 // Helper method to update the playing state. 237 // Helper method to update the playing state.
234 void UpdatePlayingState(bool is_playing_); 238 void UpdatePlayingState(bool is_playing_);
235 239
236 // Helper methods for posting task for setting states and update WebKit. 240 // Helper methods for posting task for setting states and update WebKit.
237 void UpdateNetworkState(blink::WebMediaPlayer::NetworkState state); 241 void UpdateNetworkState(blink::WebMediaPlayer::NetworkState state);
238 void UpdateReadyState(blink::WebMediaPlayer::ReadyState state); 242 void UpdateReadyState(blink::WebMediaPlayer::ReadyState state);
239 void TryCreateStreamTextureProxyIfNeeded(); 243 void TryCreateStreamTextureProxyIfNeeded();
240 void DoCreateStreamTexture(); 244 void DoCreateStreamTexture();
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 scoped_ptr<ProxyDecryptor> proxy_decryptor_; 438 scoped_ptr<ProxyDecryptor> proxy_decryptor_;
435 439
436 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; 440 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_;
437 441
438 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); 442 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid);
439 }; 443 };
440 444
441 } // namespace content 445 } // namespace content
442 446
443 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ 447 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_
OLDNEW
« no previous file with comments | « content/renderer/child_frame_compositing_helper.cc ('k') | content/renderer/media/android/webmediaplayer_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698