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

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

Issue 2014803002: Move DownloadControllerAndroid from content/ to chrome/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix failing tests/bugs Created 4 years, 6 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
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/macros.h"
10 #include "base/memory/singleton.h"
11 #include "content/public/browser/android/download_controller_android.h"
12
13 namespace content {
14 class DownloadItem;
15 class WebContents;
16 } // namespace content
17
18 namespace chrome {
19 namespace android {
20
21 // Mock implementation of the DownloadControllerAndroid.
22 class MockDownloadControllerAndroid
23 : public content::DownloadControllerAndroid {
24 public:
25 MockDownloadControllerAndroid();
26 ~MockDownloadControllerAndroid() override;
27
28 // DownloadControllerAndroid implementation.
29 void CreateGETDownload(int render_process_id, int render_view_id,
30 int request_id, bool mustDownload) override;
31 void OnDownloadStarted(content::DownloadItem* download_item) override;
32 void StartContextMenuDownload(
33 const content::ContextMenuParams& params,
34 content::WebContents* web_contents,
35 bool is_link, const std::string& extra_headers) override;
36 void DangerousDownloadValidated(content::WebContents* web_contents,
37 const std::string& download_guid,
38 bool accept) override;
39 void AcquireFileAccessPermission(
40 content::WebContents* web_contents,
41 const AcquireFileAccessPermissionCallback& callback) override;
42 void SetApproveFileAccessRequestForTesting(bool approve) override;
43
44 private:
45 bool approve_file_access_request_;
46 DISALLOW_COPY_AND_ASSIGN(MockDownloadControllerAndroid);
47 };
48
49 } // namespace android
50 } // namespace chrome
51
52
53 #endif // CHROME_BROWSER_ANDROID_DOWNLOAD_MOCK_DOWNLOAD_CONTROLLER_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698