[email protected] | 002c918 | 2012-10-02 01:33:24 | [diff] [blame] | 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 | ||||
3 | // found in the LICENSE file. | ||||
4 | |||||
5 | #include "chrome/browser/download/test_download_shelf.h" | ||||
6 | |||||
Peter Kasting | 5c07e57b | 2020-08-12 06:11:40 | [diff] [blame] | 7 | #include "base/time/time.h" |
[email protected] | 8542e68d | 2013-01-10 04:33:47 | [diff] [blame] | 8 | |
Peter Kasting | a0d521d | 2020-06-17 06:33:14 | [diff] [blame] | 9 | TestDownloadShelf::TestDownloadShelf(Profile* profile) |
Peter Kasting | 39c462d | 2020-08-12 05:59:45 | [diff] [blame] | 10 | : DownloadShelf(nullptr, profile) {} |
[email protected] | 002c918 | 2012-10-02 01:33:24 | [diff] [blame] | 11 | |
Peter Kasting | a0d521d | 2020-06-17 06:33:14 | [diff] [blame] | 12 | TestDownloadShelf::~TestDownloadShelf() = default; |
[email protected] | 002c918 | 2012-10-02 01:33:24 | [diff] [blame] | 13 | |
14 | bool TestDownloadShelf::IsShowing() const { | ||||
15 | return is_showing_; | ||||
16 | } | ||||
17 | |||||
18 | bool TestDownloadShelf::IsClosing() const { | ||||
19 | return false; | ||||
20 | } | ||||
21 | |||||
Keren Zhu | 542b3ffd | 2021-03-03 17:44:15 | [diff] [blame] | 22 | views::View* TestDownloadShelf::GetView() { |
23 | return nullptr; | ||||
24 | } | ||||
25 | |||||
Peter Kasting | c388689 | 2020-06-21 19:06:07 | [diff] [blame] | 26 | void TestDownloadShelf::DoShowDownload( |
27 | DownloadUIModel::DownloadUIModelPtr download) { | ||||
[email protected] | 8542e68d | 2013-01-10 04:33:47 | [diff] [blame] | 28 | did_add_download_ = true; |
[email protected] | 002c918 | 2012-10-02 01:33:24 | [diff] [blame] | 29 | } |
30 | |||||
sdy | 7578925 | 2017-02-17 17:25:57 | [diff] [blame] | 31 | void TestDownloadShelf::DoOpen() { |
[email protected] | 002c918 | 2012-10-02 01:33:24 | [diff] [blame] | 32 | is_showing_ = true; |
33 | } | ||||
34 | |||||
Peter Kasting | 11b6f25 | 2020-06-17 15:23:26 | [diff] [blame] | 35 | void TestDownloadShelf::DoClose() { |
[email protected] | 002c918 | 2012-10-02 01:33:24 | [diff] [blame] | 36 | is_showing_ = false; |
37 | } | ||||
38 | |||||
sdy | 7578925 | 2017-02-17 17:25:57 | [diff] [blame] | 39 | void TestDownloadShelf::DoHide() { |
40 | is_showing_ = false; | ||||
41 | } | ||||
42 | |||||
43 | void TestDownloadShelf::DoUnhide() { | ||||
44 | is_showing_ = true; | ||||
45 | } | ||||
46 | |||||
Peter Kasting | c388689 | 2020-06-21 19:06:07 | [diff] [blame] | 47 | base::TimeDelta TestDownloadShelf::GetTransientDownloadShowDelay() const { |
[email protected] | 8542e68d | 2013-01-10 04:33:47 | [diff] [blame] | 48 | return base::TimeDelta(); |
49 | } |