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

Side by Side Diff: chrome/browser/android/download/download_controller_base.h

Issue 2496983003: Use native implementation of dangerous download infobar (Closed)
Patch Set: Created 4 years, 1 month 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_CONTROLLER_BASE_H_ 5 #ifndef CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_CONTROLLER_BASE_H_
6 #define CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_CONTROLLER_BASE_H_ 6 #define CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_CONTROLLER_BASE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 // request with authentication or a POST request. Notifies the embedding 63 // request with authentication or a POST request. Notifies the embedding
64 // app about the download. Should be called on the UI thread. 64 // app about the download. Should be called on the UI thread.
65 virtual void OnDownloadStarted(content::DownloadItem* download_item) = 0; 65 virtual void OnDownloadStarted(content::DownloadItem* download_item) = 0;
66 66
67 // Called when a download is initiated by context menu. 67 // Called when a download is initiated by context menu.
68 virtual void StartContextMenuDownload( 68 virtual void StartContextMenuDownload(
69 const content::ContextMenuParams& params, 69 const content::ContextMenuParams& params,
70 content::WebContents* web_contents, 70 content::WebContents* web_contents,
71 bool is_link, const std::string& extra_headers) = 0; 71 bool is_link, const std::string& extra_headers) = 0;
72 72
73 // Called when a dangerous download item is verified or rejected.
74 virtual void DangerousDownloadValidated(content::WebContents* web_contents,
75 const std::string& download_guid,
76 bool accept) = 0;
77
78 // Callback when user permission prompt finishes. Args: whether file access 73 // Callback when user permission prompt finishes. Args: whether file access
79 // permission is acquired. 74 // permission is acquired.
80 typedef base::Callback<void(bool)> AcquireFileAccessPermissionCallback; 75 typedef base::Callback<void(bool)> AcquireFileAccessPermissionCallback;
81 76
82 // Called to prompt the user for file access permission. When finished, 77 // Called to prompt the user for file access permission. When finished,
83 // |callback| will be executed. 78 // |callback| will be executed.
84 virtual void AcquireFileAccessPermission( 79 virtual void AcquireFileAccessPermission(
85 content::WebContents* web_contents, 80 content::WebContents* web_contents,
86 const AcquireFileAccessPermissionCallback& callback) = 0; 81 const AcquireFileAccessPermissionCallback& callback) = 0;
87 82
88 // Called by unit test to approve or disapprove file access request. 83 // Called by unit test to approve or disapprove file access request.
89 virtual void SetApproveFileAccessRequestForTesting(bool approve) {} 84 virtual void SetApproveFileAccessRequestForTesting(bool approve) {}
90 85
91 protected: 86 protected:
92 ~DownloadControllerBase() override {} 87 ~DownloadControllerBase() override {}
93 static DownloadControllerBase* download_controller_; 88 static DownloadControllerBase* download_controller_;
94 }; 89 };
95 90
96 #endif // CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_CONTROLLER_BASE_H_ 91 #endif // CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_CONTROLLER_BASE_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/download/download_controller.cc ('k') | chrome/browser/android/download/mock_download_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698