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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 // WebMediaPlayerAndroid implementation. | 58 // WebMediaPlayerAndroid implementation. |
59 virtual void OnTimeUpdate(base::TimeDelta current_time) OVERRIDE; | 59 virtual void OnTimeUpdate(base::TimeDelta current_time) OVERRIDE; |
60 virtual void SetVideoSurface(jobject j_surface) OVERRIDE; | 60 virtual void SetVideoSurface(jobject j_surface) OVERRIDE; |
61 | 61 |
62 private: | 62 private: |
63 // Methods inherited from WebMediaPlayerAndroid. | 63 // Methods inherited from WebMediaPlayerAndroid. |
64 virtual void InitializeMediaPlayer(GURL url) OVERRIDE; | 64 virtual void InitializeMediaPlayer(GURL url) OVERRIDE; |
65 virtual void PlayInternal() OVERRIDE; | 65 virtual void PlayInternal() OVERRIDE; |
66 virtual void PauseInternal() OVERRIDE; | 66 virtual void PauseInternal() OVERRIDE; |
67 virtual void SeekInternal(base::TimeDelta time) OVERRIDE; | 67 virtual void SeekInternal(base::TimeDelta time) OVERRIDE; |
68 virtual float GetCurrentTimeInternal() const OVERRIDE; | 68 virtual double GetCurrentTimeInternal() const OVERRIDE; |
69 virtual void ReleaseResourcesInternal() OVERRIDE; | 69 virtual void ReleaseResourcesInternal() OVERRIDE; |
70 virtual void Destroy() OVERRIDE; | 70 virtual void Destroy() OVERRIDE; |
71 virtual void RequestExternalSurface() OVERRIDE; | 71 virtual void RequestExternalSurface() OVERRIDE; |
72 | 72 |
73 WebKit::WebFrame* const frame_; | 73 WebKit::WebFrame* const frame_; |
74 | 74 |
75 // Proxy object that delegates method calls on Render Thread. | 75 // Proxy object that delegates method calls on Render Thread. |
76 // This object is created on the Render Thread and is only called in the | 76 // This object is created on the Render Thread and is only called in the |
77 // destructor. | 77 // destructor. |
78 WebMediaPlayerProxyAndroid* proxy_; | 78 WebMediaPlayerProxyAndroid* proxy_; |
79 | 79 |
80 // The current playing time. Because the mediaplayer is in the browser | 80 // The current playing time. Because the mediaplayer is in the browser |
81 // process, it will regularly update the |current_time_| by calling | 81 // process, it will regularly update the |current_time_| by calling |
82 // OnTimeUpdate(). | 82 // OnTimeUpdate(). |
83 float current_time_; | 83 double current_time_; |
84 | 84 |
85 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImplAndroid); | 85 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImplAndroid); |
86 }; | 86 }; |
87 | 87 |
88 } // namespace webkit_media | 88 } // namespace webkit_media |
89 | 89 |
90 #endif // WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_IMPL_ANDROID_H_ | 90 #endif // WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_IMPL_ANDROID_H_ |
OLD | NEW |