blob: 8210b24eafe03c7f85b2f7ddde9e3ceef67889cb [file] [log] [blame]
[email protected]002c9182012-10-02 01:33:241// 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 Kasting5c07e57b2020-08-12 06:11:407#include "base/time/time.h"
[email protected]8542e68d2013-01-10 04:33:478
Peter Kastinga0d521d2020-06-17 06:33:149TestDownloadShelf::TestDownloadShelf(Profile* profile)
Peter Kasting39c462d2020-08-12 05:59:4510 : DownloadShelf(nullptr, profile) {}
[email protected]002c9182012-10-02 01:33:2411
Peter Kastinga0d521d2020-06-17 06:33:1412TestDownloadShelf::~TestDownloadShelf() = default;
[email protected]002c9182012-10-02 01:33:2413
14bool TestDownloadShelf::IsShowing() const {
15 return is_showing_;
16}
17
18bool TestDownloadShelf::IsClosing() const {
19 return false;
20}
21
Keren Zhu542b3ffd2021-03-03 17:44:1522views::View* TestDownloadShelf::GetView() {
23 return nullptr;
24}
25
Peter Kastingc3886892020-06-21 19:06:0726void TestDownloadShelf::DoShowDownload(
27 DownloadUIModel::DownloadUIModelPtr download) {
[email protected]8542e68d2013-01-10 04:33:4728 did_add_download_ = true;
[email protected]002c9182012-10-02 01:33:2429}
30
sdy75789252017-02-17 17:25:5731void TestDownloadShelf::DoOpen() {
[email protected]002c9182012-10-02 01:33:2432 is_showing_ = true;
33}
34
Peter Kasting11b6f252020-06-17 15:23:2635void TestDownloadShelf::DoClose() {
[email protected]002c9182012-10-02 01:33:2436 is_showing_ = false;
37}
38
sdy75789252017-02-17 17:25:5739void TestDownloadShelf::DoHide() {
40 is_showing_ = false;
41}
42
43void TestDownloadShelf::DoUnhide() {
44 is_showing_ = true;
45}
46
Peter Kastingc3886892020-06-21 19:06:0747base::TimeDelta TestDownloadShelf::GetTransientDownloadShowDelay() const {
[email protected]8542e68d2013-01-10 04:33:4748 return base::TimeDelta();
49}