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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 | 125 |
125 // Method to set the surface for video. | 126 // Method to set the surface for video. |
126 virtual void SetVideoSurface(jobject j_surface) = 0; | 127 virtual void SetVideoSurface(jobject j_surface) = 0; |
127 | 128 |
128 // Method inherited from DestructionObserver. | 129 // Method inherited from DestructionObserver. |
129 virtual void WillDestroyCurrentMessageLoop() OVERRIDE; | 130 virtual void WillDestroyCurrentMessageLoop() OVERRIDE; |
130 | 131 |
131 // Detach the player from its manager. | 132 // Detach the player from its manager. |
132 void Detach(); | 133 void Detach(); |
133 | 134 |
| 135 bool GetGeometryChange(gfx::RectF* rect); |
| 136 |
134 protected: | 137 protected: |
135 // Construct a WebMediaPlayerAndroid object with reference to the | 138 // Construct a WebMediaPlayerAndroid object with reference to the |
136 // client, manager and stream texture factory. | 139 // client, manager and stream texture factory. |
137 WebMediaPlayerAndroid(WebKit::WebMediaPlayerClient* client, | 140 WebMediaPlayerAndroid(WebKit::WebMediaPlayerClient* client, |
138 WebMediaPlayerManagerAndroid* manager, | 141 WebMediaPlayerManagerAndroid* manager, |
139 StreamTextureFactory* factory); | 142 StreamTextureFactory* factory); |
140 virtual ~WebMediaPlayerAndroid(); | 143 virtual ~WebMediaPlayerAndroid(); |
141 | 144 |
142 // Helper method to update the playing state. | 145 // Helper method to update the playing state. |
143 virtual void UpdatePlayingState(bool is_playing_); | 146 virtual void UpdatePlayingState(bool is_playing_); |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 | 253 |
251 // Whether media player needs external surface. | 254 // Whether media player needs external surface. |
252 bool needs_external_surface_; | 255 bool needs_external_surface_; |
253 | 256 |
254 // A pointer back to the compositor to inform it about state changes. This is | 257 // A pointer back to the compositor to inform it about state changes. This is |
255 // not NULL while the compositor is actively using this webmediaplayer. | 258 // not NULL while the compositor is actively using this webmediaplayer. |
256 cc::VideoFrameProvider::Client* video_frame_provider_client_; | 259 cc::VideoFrameProvider::Client* video_frame_provider_client_; |
257 | 260 |
258 scoped_ptr<webkit::WebLayerImpl> video_weblayer_; | 261 scoped_ptr<webkit::WebLayerImpl> video_weblayer_; |
259 | 262 |
| 263 gfx::RectF rect_; |
| 264 |
260 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); | 265 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); |
261 }; | 266 }; |
262 | 267 |
263 } // namespace webkit_media | 268 } // namespace webkit_media |
264 | 269 |
265 #endif // WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 270 #endif // WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
OLD | NEW |