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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 DownloadControllerAndroidImpl(); | 81 DownloadControllerAndroidImpl(); |
82 ~DownloadControllerAndroidImpl() override; | 82 ~DownloadControllerAndroidImpl() override; |
83 | 83 |
84 // DownloadControllerAndroid implementation. | 84 // DownloadControllerAndroid implementation. |
85 void CreateGETDownload(int render_process_id, | 85 void CreateGETDownload(int render_process_id, |
86 int render_view_id, | 86 int render_view_id, |
87 int request_id) override; | 87 int request_id) override; |
88 void OnDownloadStarted(DownloadItem* download_item) override; | 88 void OnDownloadStarted(DownloadItem* download_item) override; |
89 void StartContextMenuDownload(const ContextMenuParams& params, | 89 void StartContextMenuDownload(const ContextMenuParams& params, |
90 WebContents* web_contents, | 90 WebContents* web_contents, |
91 bool is_link) override; | 91 bool is_link, |
| 92 const std::string& extra_headers) override; |
92 void DangerousDownloadValidated(WebContents* web_contents, | 93 void DangerousDownloadValidated(WebContents* web_contents, |
93 int download_id, | 94 int download_id, |
94 bool accept) override; | 95 bool accept) override; |
95 | 96 |
96 // DownloadItem::Observer interface. | 97 // DownloadItem::Observer interface. |
97 void OnDownloadUpdated(DownloadItem* item) override; | 98 void OnDownloadUpdated(DownloadItem* item) override; |
98 | 99 |
99 typedef base::Callback<void(const DownloadInfoAndroid&)> | 100 typedef base::Callback<void(const DownloadInfoAndroid&)> |
100 GetDownloadInfoCB; | 101 GetDownloadInfoCB; |
101 void PrepareDownloadInfo(const GlobalRequestID& global_id, | 102 void PrepareDownloadInfo(const GlobalRequestID& global_id, |
(...skipping 28 matching lines...) Expand all Loading... |
130 JavaObject* java_object_; | 131 JavaObject* java_object_; |
131 | 132 |
132 ScopedVector<DeferredDownloadObserver> deferred_downloads_; | 133 ScopedVector<DeferredDownloadObserver> deferred_downloads_; |
133 | 134 |
134 DISALLOW_COPY_AND_ASSIGN(DownloadControllerAndroidImpl); | 135 DISALLOW_COPY_AND_ASSIGN(DownloadControllerAndroidImpl); |
135 }; | 136 }; |
136 | 137 |
137 } // namespace content | 138 } // namespace content |
138 | 139 |
139 #endif // CONTENT_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_IMPL_H_ | 140 #endif // CONTENT_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_IMPL_H_ |
OLD | NEW |