| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 std::string original_mime_type; | 76 std::string original_mime_type; |
| 77 std::string user_agent; | 77 std::string user_agent; |
| 78 std::string cookie; | 78 std::string cookie; |
| 79 std::string referer; | 79 std::string referer; |
| 80 bool has_user_gesture; | 80 bool has_user_gesture; |
| 81 | 81 |
| 82 WebContents* web_contents; | 82 WebContents* web_contents; |
| 83 // Default copy constructor is used for passing this struct by value. | 83 // Default copy constructor is used for passing this struct by value. |
| 84 }; | 84 }; |
| 85 struct JavaObject; | 85 struct JavaObject; |
| 86 friend struct DefaultSingletonTraits<DownloadControllerAndroidImpl>; | 86 friend struct base::DefaultSingletonTraits<DownloadControllerAndroidImpl>; |
| 87 DownloadControllerAndroidImpl(); | 87 DownloadControllerAndroidImpl(); |
| 88 ~DownloadControllerAndroidImpl() override; | 88 ~DownloadControllerAndroidImpl() override; |
| 89 | 89 |
| 90 // Helper method for implementing AcquireFileAccessPermission(). | 90 // Helper method for implementing AcquireFileAccessPermission(). |
| 91 bool HasFileAccessPermission( | 91 bool HasFileAccessPermission( |
| 92 base::android::ScopedJavaLocalRef<jobject> j_content_view_core); | 92 base::android::ScopedJavaLocalRef<jobject> j_content_view_core); |
| 93 | 93 |
| 94 // DownloadControllerAndroid implementation. | 94 // DownloadControllerAndroid implementation. |
| 95 void CreateGETDownload(int render_process_id, | 95 void CreateGETDownload(int render_process_id, |
| 96 int render_view_id, | 96 int render_view_id, |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 JavaObject* java_object_; | 143 JavaObject* java_object_; |
| 144 | 144 |
| 145 ScopedVector<DeferredDownloadObserver> deferred_downloads_; | 145 ScopedVector<DeferredDownloadObserver> deferred_downloads_; |
| 146 | 146 |
| 147 DISALLOW_COPY_AND_ASSIGN(DownloadControllerAndroidImpl); | 147 DISALLOW_COPY_AND_ASSIGN(DownloadControllerAndroidImpl); |
| 148 }; | 148 }; |
| 149 | 149 |
| 150 } // namespace content | 150 } // namespace content |
| 151 | 151 |
| 152 #endif // CONTENT_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_IMPL_H_ | 152 #endif // CONTENT_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_IMPL_H_ |
| OLD | NEW |