chromium/chrome/browser/download/download_commands.cc

// Copyright 2015 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/download/download_commands.h"

#include <stdint.h>

#include "base/base64.h"
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/thread_pool.h"
#include "base/threading/scoped_blocking_call.h"
#include "build/build_config.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/download/download_crx_util.h"
#include "chrome/browser/download/download_ui_model.h"
#include "chrome/browser/image_decoder/image_decoder.h"
#include "chrome/common/url_constants.h"
#include "components/google/core/common/google_util.h"
#include "content/public/browser/browser_thread.h"
#include "net/base/url_util.h"
#include "ui/base/clipboard/scoped_clipboard_writer.h"

#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
    BUILDFLAG(IS_MAC)
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/scoped_tabbed_browser_displayer.h"
#endif

#if BUILDFLAG(IS_WIN)
#include "chrome/browser/download/download_target_determiner.h"
#endif

namespace {

// Maximum size (compressed) of image to be copied to the clipboard. If the
// image exceeds this size, the image is not copied.
const int64_t kMaxImageClipboardSize =;  // 20 MB

class ImageClipboardCopyManager : public ImageDecoder::ImageRequest {};

}  // namespace

DownloadCommands::DownloadCommands(base::WeakPtr<DownloadUIModel> model)
    :{}

DownloadCommands::~DownloadCommands() = default;

GURL DownloadCommands::GetLearnMoreURLForInterruptedDownload() const {}

bool DownloadCommands::IsCommandEnabled(Command command) const {}

bool DownloadCommands::IsCommandChecked(Command command) const {}

bool DownloadCommands::IsCommandVisible(Command command) const {}

void DownloadCommands::ExecuteCommand(Command command) {}

#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
    BUILDFLAG(IS_CHROMEOS)

Browser* DownloadCommands::GetBrowser() const {}

bool DownloadCommands::IsDownloadPdf() const {}

bool DownloadCommands::CanOpenPdfInSystemViewer() const {}

#endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ||
        // BUILDFLAG(IS_CHROMEOS)

void DownloadCommands::CopyFileAsImageToClipboard() {}

bool DownloadCommands::CanBeCopiedToClipboard() const {}