| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 // DownloadControllerAndroid implementation. | 95 // DownloadControllerAndroid implementation. |
| 96 void CreateGETDownload(int render_process_id, | 96 void CreateGETDownload(int render_process_id, |
| 97 int render_view_id, | 97 int render_view_id, |
| 98 int request_id) override; | 98 int request_id) override; |
| 99 void OnDownloadStarted(DownloadItem* download_item) override; | 99 void OnDownloadStarted(DownloadItem* download_item) override; |
| 100 void StartContextMenuDownload(const ContextMenuParams& params, | 100 void StartContextMenuDownload(const ContextMenuParams& params, |
| 101 WebContents* web_contents, | 101 WebContents* web_contents, |
| 102 bool is_link, | 102 bool is_link, |
| 103 const std::string& extra_headers) override; | 103 const std::string& extra_headers) override; |
| 104 void DangerousDownloadValidated(WebContents* web_contents, | 104 void DangerousDownloadValidated(WebContents* web_contents, |
| 105 int download_id, | 105 const std::string& download_guid, |
| 106 bool accept) override; | 106 bool accept) override; |
| 107 | 107 |
| 108 // DownloadItem::Observer interface. | 108 // DownloadItem::Observer interface. |
| 109 void OnDownloadUpdated(DownloadItem* item) override; | 109 void OnDownloadUpdated(DownloadItem* item) override; |
| 110 | 110 |
| 111 typedef base::Callback<void(const DownloadInfoAndroid&)> | 111 typedef base::Callback<void(const DownloadInfoAndroid&)> |
| 112 GetDownloadInfoCB; | 112 GetDownloadInfoCB; |
| 113 void PrepareDownloadInfo(const GlobalRequestID& global_id, | 113 void PrepareDownloadInfo(const GlobalRequestID& global_id, |
| 114 const GetDownloadInfoCB& callback); | 114 const GetDownloadInfoCB& callback); |
| 115 void CheckPolicyAndLoadCookies(const DownloadInfoAndroid& info, | 115 void CheckPolicyAndLoadCookies(const DownloadInfoAndroid& info, |
| (...skipping 30 matching lines...) Expand all Loading... |
| 146 std::string default_file_name_; | 146 std::string default_file_name_; |
| 147 | 147 |
| 148 ScopedVector<DeferredDownloadObserver> deferred_downloads_; | 148 ScopedVector<DeferredDownloadObserver> deferred_downloads_; |
| 149 | 149 |
| 150 DISALLOW_COPY_AND_ASSIGN(DownloadControllerAndroidImpl); | 150 DISALLOW_COPY_AND_ASSIGN(DownloadControllerAndroidImpl); |
| 151 }; | 151 }; |
| 152 | 152 |
| 153 } // namespace content | 153 } // namespace content |
| 154 | 154 |
| 155 #endif // CONTENT_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_IMPL_H_ | 155 #endif // CONTENT_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_IMPL_H_ |
| OLD | NEW |