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

Side by Side Diff: chrome/browser/android/chrome_web_contents_delegate_android.cc

Issue 11640007: Make the UI an observer of downloads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 #include "chrome/browser/android/chrome_web_contents_delegate_android.h" 5 #include "chrome/browser/android/chrome_web_contents_delegate_android.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "chrome/browser/file_select_helper.h" 8 #include "chrome/browser/file_select_helper.h"
9 #include "chrome/browser/ui/app_modal_dialogs/javascript_dialog_creator.h" 9 #include "chrome/browser/ui/app_modal_dialogs/javascript_dialog_creator.h"
10 #include "chrome/browser/ui/find_bar/find_match_rects_details.h" 10 #include "chrome/browser/ui/find_bar/find_match_rects_details.h"
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 int request_id, 243 int request_id,
244 const std::string& request_method) { 244 const std::string& request_method) {
245 if (request_method == net::HttpRequestHeaders::kGetMethod) { 245 if (request_method == net::HttpRequestHeaders::kGetMethod) {
246 content::DownloadControllerAndroid::Get()->CreateGETDownload( 246 content::DownloadControllerAndroid::Get()->CreateGETDownload(
247 source, request_id); 247 source, request_id);
248 return false; 248 return false;
249 } 249 }
250 return true; 250 return true;
251 } 251 }
252 252
253 void ChromeWebContentsDelegateAndroid::OnStartDownload(
254 WebContents* source,
255 content::DownloadItem* download) {
256 content::DownloadControllerAndroid::Get()->OnPostDownloadStarted(
257 source, download);
258 }
259
260 } // namespace android 253 } // namespace android
261 } // namespace chrome 254 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698