| 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_IMPL_ANDROID_H_ | 5 #ifndef WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_IMPL_ANDROID_H_ |
| 6 #define WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_IMPL_ANDROID_H_ | 6 #define WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_IMPL_ANDROID_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include <jni.h> | 10 #include <jni.h> |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 // |proxy|. | 38 // |proxy|. |
| 39 // TODO(qinmin): |frame| argument is used to determine whether the current | 39 // TODO(qinmin): |frame| argument is used to determine whether the current |
| 40 // player can enter fullscreen. | 40 // player can enter fullscreen. |
| 41 WebMediaPlayerImplAndroid(WebKit::WebFrame* frame, | 41 WebMediaPlayerImplAndroid(WebKit::WebFrame* frame, |
| 42 WebKit::WebMediaPlayerClient* client, | 42 WebKit::WebMediaPlayerClient* client, |
| 43 WebMediaPlayerManagerAndroid* manager, | 43 WebMediaPlayerManagerAndroid* manager, |
| 44 WebMediaPlayerProxyAndroid* proxy, | 44 WebMediaPlayerProxyAndroid* proxy, |
| 45 StreamTextureFactory* factory); | 45 StreamTextureFactory* factory); |
| 46 virtual ~WebMediaPlayerImplAndroid(); | 46 virtual ~WebMediaPlayerImplAndroid(); |
| 47 | 47 |
| 48 // WebKit::WebMediaPlayer implementation. |
| 49 virtual void enterFullscreen(); |
| 50 virtual void exitFullscreen(); |
| 51 virtual bool canEnterFullscreen() const; |
| 52 |
| 53 // Functions called when media player status changes. |
| 54 void OnMediaPlayerPlay(); |
| 55 void OnMediaPlayerPause(); |
| 56 void OnDidEnterFullscreen(); |
| 57 void OnDidExitFullscreen(); |
| 58 |
| 48 // WebMediaPlayerAndroid implementation. | 59 // WebMediaPlayerAndroid implementation. |
| 49 virtual void OnTimeUpdate(base::TimeDelta current_time) OVERRIDE; | 60 virtual void OnTimeUpdate(base::TimeDelta current_time) OVERRIDE; |
| 50 virtual void SetVideoSurface(jobject j_surface) OVERRIDE; | 61 virtual void SetVideoSurface(jobject j_surface) OVERRIDE; |
| 51 | 62 |
| 52 private: | 63 private: |
| 53 // Methods inherited from WebMediaPlayerAndroid. | 64 // Methods inherited from WebMediaPlayerAndroid. |
| 54 virtual void InitializeMediaPlayer(GURL url) OVERRIDE; | 65 virtual void InitializeMediaPlayer(GURL url) OVERRIDE; |
| 55 virtual void PlayInternal() OVERRIDE; | 66 virtual void PlayInternal() OVERRIDE; |
| 56 virtual void PauseInternal() OVERRIDE; | 67 virtual void PauseInternal() OVERRIDE; |
| 57 virtual void SeekInternal(base::TimeDelta time) OVERRIDE; | 68 virtual void SeekInternal(base::TimeDelta time) OVERRIDE; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 70 // process, it will regularly update the |current_time_| by calling | 81 // process, it will regularly update the |current_time_| by calling |
| 71 // OnTimeUpdate(). | 82 // OnTimeUpdate(). |
| 72 float current_time_; | 83 float current_time_; |
| 73 | 84 |
| 74 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImplAndroid); | 85 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImplAndroid); |
| 75 }; | 86 }; |
| 76 | 87 |
| 77 } // namespace webkit_media | 88 } // namespace webkit_media |
| 78 | 89 |
| 79 #endif // WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_IMPL_ANDROID_H_ | 90 #endif // WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_IMPL_ANDROID_H_ |
| OLD | NEW |