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

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

Issue 1217223006: Prompt user for file access permission before download starts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 5 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/android/download/mock_download_controller_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_ANDROID_DOWNLOAD_MOCK_DOWNLOAD_CONTROLLER_ANDROID_H_
6 #define CHROME_BROWSER_ANDROID_DOWNLOAD_MOCK_DOWNLOAD_CONTROLLER_ANDROID_H_
7
8 #include "base/callback.h"
9 #include "base/memory/singleton.h"
10 #include "content/public/browser/android/download_controller_android.h"
11
12 namespace content {
13 class DownloadItem;
14 class WebContents;
15 } // namespace content
16
17 namespace chrome {
18 namespace android {
19
20 // Mock implementation of the DownloadControllerAndroid.
21 class MockDownloadControllerAndroid
22 : public content::DownloadControllerAndroid {
23 public:
24 MockDownloadControllerAndroid();
25 ~MockDownloadControllerAndroid() override;
26
27 // DownloadControllerAndroid implementation.
28 void CreateGETDownload(int render_process_id, int render_view_id,
29 int request_id) override;
30 void OnDownloadStarted(content::DownloadItem* download_item) override;
31 void StartContextMenuDownload(
32 const content::ContextMenuParams& params,
33 content::WebContents* web_contents,
34 bool is_link, const std::string& extra_headers) override;
35 void DangerousDownloadValidated(
36 content::WebContents* web_contents, int download_id,
37 bool accept) override;
38 void AcquireFileAccessPermission(
39 content::WebContents* web_contents,
40 const AcquireFileAccessPermissionCallback& callback) override;
41 void SetApproveFileAccessRequestForTesting(bool approve) override;
42
43 private:
44 bool approve_file_access_request_;
45 DISALLOW_COPY_AND_ASSIGN(MockDownloadControllerAndroid);
46 };
47
48 } // namespace android
49 } // namespace chrome
50
51
52 #endif // CHROME_BROWSER_ANDROID_DOWNLOAD_MOCK_DOWNLOAD_CONTROLLER_ANDROID_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/download/mock_download_controller_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698