Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(563)

Side by Side Diff: content/browser/android/download_controller_android_impl.h

Issue 13649009: Android: Use a ResourceThrottle to intercept GET downloads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 WebContents* web_contents; 69 WebContents* web_contents;
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(int render_process_id, int render_view_id,
79 int request_id) OVERRIDE; 79 int request_id) OVERRIDE;
80 virtual void OnPostDownloadStarted(DownloadItem* download_item) OVERRIDE; 80 virtual void OnPostDownloadStarted(DownloadItem* download_item) OVERRIDE;
81 81
82 // DownloadItem::Observer interface. 82 // DownloadItem::Observer interface.
83 virtual void OnDownloadUpdated(DownloadItem* item) OVERRIDE; 83 virtual void OnDownloadUpdated(DownloadItem* item) OVERRIDE;
84 84
85 typedef base::Callback<void(const DownloadInfoAndroid&)> 85 typedef base::Callback<void(const DownloadInfoAndroid&)>
86 GetDownloadInfoCB; 86 GetDownloadInfoCB;
87 void PrepareDownloadInfo(const GlobalRequestID& global_id, 87 void PrepareDownloadInfo(const GlobalRequestID& global_id,
88 const GetDownloadInfoCB& callback); 88 const GetDownloadInfoCB& callback);
(...skipping 23 matching lines...) Expand all
112 JavaObject* GetJavaObject(); 112 JavaObject* GetJavaObject();
113 113
114 JavaObject* java_object_; 114 JavaObject* java_object_;
115 115
116 DISALLOW_COPY_AND_ASSIGN(DownloadControllerAndroidImpl); 116 DISALLOW_COPY_AND_ASSIGN(DownloadControllerAndroidImpl);
117 }; 117 };
118 118
119 } // namespace content 119 } // namespace content
120 120
121 #endif // CONTENT_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_IMPL_H_ 121 #endif // CONTENT_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698