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_IN_PROCESS_ANDROID_H_ | 5 #ifndef WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_IN_PROCESS_ANDROID_H_ |
6 #define WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_IN_PROCESS_ANDROID_H_ | 6 #define WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_IN_PROCESS_ANDROID_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include <jni.h> | 10 #include <jni.h> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "media/base/android/cookie_getter.h" | 14 #include "media/base/android/media_resource_getter.h" |
15 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" | 15 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" |
16 #include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h" | 16 #include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h" |
17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayer.h" | 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayer.h" |
18 #include "webkit/media/android/webmediaplayer_android.h" | 18 #include "webkit/media/android/webmediaplayer_android.h" |
19 | 19 |
20 namespace WebKit { | 20 namespace WebKit { |
21 class WebCookieJar; | 21 class WebCookieJar; |
22 class WebFrame; | 22 class WebFrame; |
23 } | 23 } |
24 | 24 |
25 namespace media { | 25 namespace media { |
26 class MediaPlayerBridge; | 26 class MediaPlayerBridge; |
27 class MediaPlayerBridgeManager; | 27 class MediaPlayerBridgeManager; |
28 } | 28 } |
29 | 29 |
30 namespace webkit_media { | 30 namespace webkit_media { |
31 | 31 |
32 class StreamTextureFactory; | 32 class StreamTextureFactory; |
33 class WebMediaPlayerManagerAndroid; | 33 class WebMediaPlayerManagerAndroid; |
34 | 34 |
35 // Class for retrieving the cookies from WebCookieJar. | 35 // Class for retrieving the media resources. |
36 class InProcessCookieGetter : public media::CookieGetter { | 36 class InProcessMediaResourceGetter |
| 37 : public media::MediaResourceGetter { |
37 public: | 38 public: |
38 // Construct an InProcessCookieGetter object from a WebCookieJar. | 39 // Construct an InProcessCookieGetter object from a WebCookieJar. |
39 explicit InProcessCookieGetter(WebKit::WebCookieJar* cookie_jar); | 40 explicit InProcessMediaResourceGetter(WebKit::WebCookieJar* cookie_jar); |
40 virtual ~InProcessCookieGetter(); | 41 virtual ~InProcessMediaResourceGetter(); |
41 | 42 |
42 // media::CookieGetter implementation. | 43 // media::CookieGetter implementation. |
43 virtual void GetCookies(const std::string& url, | 44 virtual void GetCookies(const GURL& url, |
44 const std::string& first_party_for_cookies, | 45 const GURL& first_party_for_cookies, |
45 const GetCookieCB& callback) OVERRIDE; | 46 const GetCookieCB& callback) OVERRIDE; |
| 47 virtual void GetPlatformPathFromFileSystemURL( |
| 48 const GURL& url, |
| 49 const GetPlatformPathCB& callback) OVERRIDE; |
46 | 50 |
47 private: | 51 private: |
48 WebKit::WebCookieJar* cookie_jar_; | 52 WebKit::WebCookieJar* cookie_jar_; |
49 DISALLOW_COPY_AND_ASSIGN(InProcessCookieGetter); | 53 DISALLOW_COPY_AND_ASSIGN(InProcessMediaResourceGetter); |
50 }; | 54 }; |
51 | 55 |
52 // This class implements WebKit::WebMediaPlayer by keeping the android | 56 // This class implements WebKit::WebMediaPlayer by keeping the android |
53 // mediaplayer in the render process. This mode is being deprecated | 57 // mediaplayer in the render process. This mode is being deprecated |
54 // as mediaplayer is going to be moved to the browser process. | 58 // as mediaplayer is going to be moved to the browser process. |
55 class WebMediaPlayerInProcessAndroid : public WebMediaPlayerAndroid { | 59 class WebMediaPlayerInProcessAndroid : public WebMediaPlayerAndroid { |
56 public: | 60 public: |
57 // Construct a WebMediaPlayerInProcessAndroid object. | 61 // Construct a WebMediaPlayerInProcessAndroid object. |
58 WebMediaPlayerInProcessAndroid( | 62 WebMediaPlayerInProcessAndroid( |
59 WebKit::WebFrame* frame, | 63 WebKit::WebFrame* frame, |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 112 |
109 // Whether we should disable history logging. | 113 // Whether we should disable history logging. |
110 bool disable_history_logging_; | 114 bool disable_history_logging_; |
111 | 115 |
112 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerInProcessAndroid); | 116 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerInProcessAndroid); |
113 }; | 117 }; |
114 | 118 |
115 } // namespace webkit_media | 119 } // namespace webkit_media |
116 | 120 |
117 #endif // WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_IN_PROCESS_ANDROID_H_ | 121 #endif // WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_IN_PROCESS_ANDROID_H_ |
OLD | NEW |