| 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 // This class pairs with DownloadController on Java side to forward requests | 5 // This class pairs with DownloadController on Java side to forward requests |
| 6 // for GET downloads to the current DownloadListener. POST downloads are | 6 // for GET downloads to the current DownloadListener. POST downloads are |
| 7 // handled on the native side. | 7 // handled on the native side. |
| 8 // | 8 // |
| 9 // Both classes are Singleton classes. C++ object owns Java object. | 9 // Both classes are Singleton classes. C++ object owns Java object. |
| 10 // | 10 // |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 // Default copy constructor is used for passing this struct by value. | 70 // Default copy constructor is used for passing this struct by value. |
| 71 }; | 71 }; |
| 72 struct JavaObject; | 72 struct JavaObject; |
| 73 friend struct DefaultSingletonTraits<DownloadControllerAndroidImpl>; | 73 friend struct DefaultSingletonTraits<DownloadControllerAndroidImpl>; |
| 74 DownloadControllerAndroidImpl(); | 74 DownloadControllerAndroidImpl(); |
| 75 virtual ~DownloadControllerAndroidImpl(); | 75 virtual ~DownloadControllerAndroidImpl(); |
| 76 | 76 |
| 77 // DownloadControllerAndroid implementation. | 77 // DownloadControllerAndroid implementation. |
| 78 virtual void CreateGETDownload(RenderViewHost* source, | 78 virtual void CreateGETDownload(RenderViewHost* source, |
| 79 int request_id) OVERRIDE; | 79 int request_id) OVERRIDE; |
| 80 virtual void OnPostDownloadStarted(WebContents* web_contents, | 80 virtual void OnPostDownloadStarted(DownloadItem* download_item) OVERRIDE; |
| 81 DownloadItem* download_item) OVERRIDE; | |
| 82 | 81 |
| 83 // DownloadItem::Observer interface. | 82 // DownloadItem::Observer interface. |
| 84 virtual void OnDownloadUpdated(DownloadItem* item) OVERRIDE; | 83 virtual void OnDownloadUpdated(DownloadItem* item) OVERRIDE; |
| 85 virtual void OnDownloadOpened(DownloadItem* item) OVERRIDE; | |
| 86 | 84 |
| 87 typedef base::Callback<void(const DownloadInfoAndroid&)> | 85 typedef base::Callback<void(const DownloadInfoAndroid&)> |
| 88 GetDownloadInfoCB; | 86 GetDownloadInfoCB; |
| 89 void PrepareDownloadInfo(const GlobalRequestID& global_id, | 87 void PrepareDownloadInfo(const GlobalRequestID& global_id, |
| 90 const GetDownloadInfoCB& callback); | 88 const GetDownloadInfoCB& callback); |
| 91 void CheckPolicyAndLoadCookies(const DownloadInfoAndroid& info, | 89 void CheckPolicyAndLoadCookies(const DownloadInfoAndroid& info, |
| 92 const GetDownloadInfoCB& callback, | 90 const GetDownloadInfoCB& callback, |
| 93 const GlobalRequestID& global_id, | 91 const GlobalRequestID& global_id, |
| 94 const net::CookieList& cookie_list); | 92 const net::CookieList& cookie_list); |
| 95 void DoLoadCookies(const DownloadInfoAndroid& info, | 93 void DoLoadCookies(const DownloadInfoAndroid& info, |
| (...skipping 18 matching lines...) Expand all Loading... |
| 114 JavaObject* GetJavaObject(); | 112 JavaObject* GetJavaObject(); |
| 115 | 113 |
| 116 JavaObject* java_object_; | 114 JavaObject* java_object_; |
| 117 | 115 |
| 118 DISALLOW_COPY_AND_ASSIGN(DownloadControllerAndroidImpl); | 116 DISALLOW_COPY_AND_ASSIGN(DownloadControllerAndroidImpl); |
| 119 }; | 117 }; |
| 120 | 118 |
| 121 } // namespace content | 119 } // namespace content |
| 122 | 120 |
| 123 #endif // CONTENT_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_IMPL_H_ | 121 #endif // CONTENT_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_IMPL_H_ |
| OLD | NEW |