OLD | NEW |
---|---|
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/WebSize.h" | 16 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" |
17 #include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h" | 17 #include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h" |
18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayer.h" | 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayer.h" |
19 #include "ui/gfx/rect_f.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 { |
26 | 27 |
27 class WebMediaPlayerManagerAndroid; | 28 class WebMediaPlayerManagerAndroid; |
28 | 29 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
125 | 126 |
126 // Method to set the surface for video. | 127 // Method to set the surface for video. |
127 virtual void SetVideoSurface(jobject j_surface) = 0; | 128 virtual void SetVideoSurface(jobject j_surface) = 0; |
128 | 129 |
129 // Method inherited from DestructionObserver. | 130 // Method inherited from DestructionObserver. |
130 virtual void WillDestroyCurrentMessageLoop() OVERRIDE; | 131 virtual void WillDestroyCurrentMessageLoop() OVERRIDE; |
131 | 132 |
132 // Detach the player from its manager. | 133 // Detach the player from its manager. |
133 void Detach(); | 134 void Detach(); |
134 | 135 |
136 bool GetGeometryChange(gfx::RectF* rect); | |
scherkus (not reviewing)
2013/04/08 14:58:23
needs docs
wonsik
2013/04/09 09:13:22
Done.
| |
137 | |
135 protected: | 138 protected: |
136 // Construct a WebMediaPlayerAndroid object with reference to the | 139 // Construct a WebMediaPlayerAndroid object with reference to the |
137 // client, manager and stream texture factory. | 140 // client, manager and stream texture factory. |
138 WebMediaPlayerAndroid(WebKit::WebMediaPlayerClient* client, | 141 WebMediaPlayerAndroid(WebKit::WebMediaPlayerClient* client, |
139 WebMediaPlayerManagerAndroid* manager, | 142 WebMediaPlayerManagerAndroid* manager, |
140 StreamTextureFactory* factory); | 143 StreamTextureFactory* factory); |
141 virtual ~WebMediaPlayerAndroid(); | 144 virtual ~WebMediaPlayerAndroid(); |
142 | 145 |
143 // Helper method to update the playing state. | 146 // Helper method to update the playing state. |
144 virtual void UpdatePlayingState(bool is_playing_); | 147 virtual void UpdatePlayingState(bool is_playing_); |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
251 | 254 |
252 // Whether media player needs external surface. | 255 // Whether media player needs external surface. |
253 bool needs_external_surface_; | 256 bool needs_external_surface_; |
254 | 257 |
255 // A pointer back to the compositor to inform it about state changes. This is | 258 // A pointer back to the compositor to inform it about state changes. This is |
256 // not NULL while the compositor is actively using this webmediaplayer. | 259 // not NULL while the compositor is actively using this webmediaplayer. |
257 cc::VideoFrameProvider::Client* video_frame_provider_client_; | 260 cc::VideoFrameProvider::Client* video_frame_provider_client_; |
258 | 261 |
259 scoped_ptr<webkit::WebLayerImpl> video_weblayer_; | 262 scoped_ptr<webkit::WebLayerImpl> video_weblayer_; |
260 | 263 |
264 gfx::RectF rect_; | |
scherkus (not reviewing)
2013/04/08 14:58:23
perhaps there's a more descriptive name? comment?
wonsik
2013/04/09 09:13:22
Done.
| |
265 | |
261 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); | 266 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); |
262 }; | 267 }; |
263 | 268 |
264 } // namespace webkit_media | 269 } // namespace webkit_media |
265 | 270 |
266 #endif // WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 271 #endif // WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
OLD | NEW |