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

Side by Side Diff: webkit/media/android/webmediaplayer_android.h

Issue 13620008: Enable 2D Canvas painting for Chrome on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing Min's comments. Created 7 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ 5 #ifndef WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_
6 #define WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ 6 #define WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/message_loop.h" 13 #include "base/message_loop.h"
14 #include "base/time.h" 14 #include "base/time.h"
15 #include "cc/layers/video_frame_provider.h" 15 #include "cc/layers/video_frame_provider.h"
16 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3 D.h"
16 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" 17 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h"
17 #include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h" 18 #include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h"
18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayer.h" 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayer.h"
19 #include "webkit/media/android/stream_texture_factory_android.h" 20 #include "webkit/media/android/stream_texture_factory_android.h"
20 21
21 namespace webkit { 22 namespace webkit {
22 class WebLayerImpl; 23 class WebLayerImpl;
23 } 24 }
24 25
25 namespace webkit_media { 26 namespace webkit_media {
(...skipping 27 matching lines...) Expand all
53 virtual bool totalBytesKnown(); 54 virtual bool totalBytesKnown();
54 virtual const WebKit::WebTimeRanges& buffered(); 55 virtual const WebKit::WebTimeRanges& buffered();
55 virtual float maxTimeSeekable() const; 56 virtual float maxTimeSeekable() const;
56 57
57 // Methods for painting. 58 // Methods for painting.
58 virtual void setSize(const WebKit::WebSize& size); 59 virtual void setSize(const WebKit::WebSize& size);
59 virtual void paint(WebKit::WebCanvas* canvas, 60 virtual void paint(WebKit::WebCanvas* canvas,
60 const WebKit::WebRect& rect, 61 const WebKit::WebRect& rect,
61 uint8_t alpha); 62 uint8_t alpha);
62 63
64 virtual bool copyVideoTextureToPlatformTexture(
65 WebKit::WebGraphicsContext3D* web_graphics_context,
66 unsigned int texture,
67 unsigned int level,
68 unsigned int internal_format,
69 bool premultiply_alpha,
70 bool flip_y) OVERRIDE;
scherkus (not reviewing) 2013/04/10 00:05:08 this shouldn't be override since the interface is
71
63 // True if the loaded media has a playable video/audio track. 72 // True if the loaded media has a playable video/audio track.
64 virtual bool hasVideo() const; 73 virtual bool hasVideo() const;
65 virtual bool hasAudio() const; 74 virtual bool hasAudio() const;
66 75
67 // Dimensions of the video. 76 // Dimensions of the video.
68 virtual WebKit::WebSize naturalSize() const; 77 virtual WebKit::WebSize naturalSize() const;
69 78
70 // Getters of playback state. 79 // Getters of playback state.
71 virtual bool paused() const; 80 virtual bool paused() const;
72 virtual bool seeking() const; 81 virtual bool seeking() const;
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 cc::VideoFrameProvider::Client* video_frame_provider_client_; 266 cc::VideoFrameProvider::Client* video_frame_provider_client_;
258 267
259 scoped_ptr<webkit::WebLayerImpl> video_weblayer_; 268 scoped_ptr<webkit::WebLayerImpl> video_weblayer_;
260 269
261 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); 270 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid);
262 }; 271 };
263 272
264 } // namespace webkit_media 273 } // namespace webkit_media
265 274
266 #endif // WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ 275 #endif // WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698