blob: 8b8fd52e5c95d3067ec4b05a6d57b6d340ef6481 [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
[email protected]8542e68d2013-01-10 04:33:477#include "content/public/browser/download_manager.h"
8
Peter Kastinga0d521d2020-06-17 06:33:149TestDownloadShelf::TestDownloadShelf(Profile* profile)
Peter Kasting3df6ea8d2020-06-18 05:45:4510 : DownloadShelf(nullptr, profile),
11 is_showing_(false),
12 did_add_download_(false) {}
[email protected]002c9182012-10-02 01:33:2413
Peter Kastinga0d521d2020-06-17 06:33:1414TestDownloadShelf::~TestDownloadShelf() = default;
[email protected]002c9182012-10-02 01:33:2415
16bool TestDownloadShelf::IsShowing() const {
17 return is_showing_;
18}
19
20bool TestDownloadShelf::IsClosing() const {
21 return false;
22}
23
Peter Kastingc3886892020-06-21 19:06:0724void TestDownloadShelf::DoShowDownload(
25 DownloadUIModel::DownloadUIModelPtr download) {
[email protected]8542e68d2013-01-10 04:33:4726 did_add_download_ = true;
[email protected]002c9182012-10-02 01:33:2427}
28
sdy75789252017-02-17 17:25:5729void TestDownloadShelf::DoOpen() {
[email protected]002c9182012-10-02 01:33:2430 is_showing_ = true;
31}
32
Peter Kasting11b6f252020-06-17 15:23:2633void TestDownloadShelf::DoClose() {
[email protected]002c9182012-10-02 01:33:2434 is_showing_ = false;
35}
36
sdy75789252017-02-17 17:25:5737void TestDownloadShelf::DoHide() {
38 is_showing_ = false;
39}
40
41void TestDownloadShelf::DoUnhide() {
42 is_showing_ = true;
43}
44
Peter Kastingc3886892020-06-21 19:06:0745base::TimeDelta TestDownloadShelf::GetTransientDownloadShowDelay() const {
[email protected]8542e68d2013-01-10 04:33:4746 return base::TimeDelta();
47}