2024-04-26 21:21:33 +02:00
|
|
|
// Copyright 2024 The Chromium Embedded Framework Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be found
|
|
|
|
// in the LICENSE file.
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
#ifndef CEF_LIBCEF_BROWSER_DOWNLOAD_MANAGER_DELEGATE_H_
|
|
|
|
#define CEF_LIBCEF_BROWSER_DOWNLOAD_MANAGER_DELEGATE_H_
|
|
|
|
#pragma once
|
|
|
|
|
2024-04-26 21:21:33 +02:00
|
|
|
#include <memory>
|
2012-11-30 20:08:20 +01:00
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
#include "content/public/browser/download_manager_delegate.h"
|
|
|
|
|
2024-04-26 21:21:33 +02:00
|
|
|
namespace content {
|
|
|
|
class DownloadManager;
|
|
|
|
} // namespace content
|
2021-12-06 21:40:25 +01:00
|
|
|
|
2024-04-26 21:21:33 +02:00
|
|
|
namespace cef {
|
2021-12-06 21:40:25 +01:00
|
|
|
|
2024-04-26 21:21:33 +02:00
|
|
|
class DownloadManagerDelegate : public content::DownloadManagerDelegate {
|
|
|
|
public:
|
|
|
|
// Called from the ChromeDownloadManagerDelegate constructor for Chrome
|
|
|
|
// bootstrap. Alloy bootstrap uses AlloyDownloadManagerDelegate directly.
|
|
|
|
static std::unique_ptr<DownloadManagerDelegate> Create(
|
|
|
|
content::DownloadManager* download_manager);
|
2012-11-30 20:08:20 +01:00
|
|
|
|
|
|
|
private:
|
2024-04-26 21:21:33 +02:00
|
|
|
// Allow deletion via std::unique_ptr only.
|
|
|
|
friend std::default_delete<DownloadManagerDelegate>;
|
2012-04-03 03:34:16 +02:00
|
|
|
};
|
|
|
|
|
2024-04-26 21:21:33 +02:00
|
|
|
} // namespace cef
|
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
#endif // CEF_LIBCEF_BROWSER_DOWNLOAD_MANAGER_DELEGATE_H_
|