mirror of
				https://bitbucket.org/chromiumembedded/cef
				synced 2025-06-05 21:39:12 +02:00 
			
		
		
		
	Behaves the same as Alloy runtime except that CanDownload is not called for invalid protocol schemes.
		
			
				
	
	
		
			34 lines
		
	
	
		
			1016 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			34 lines
		
	
	
		
			1016 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| // 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.
 | |
| 
 | |
| #ifndef CEF_LIBCEF_BROWSER_DOWNLOAD_MANAGER_DELEGATE_H_
 | |
| #define CEF_LIBCEF_BROWSER_DOWNLOAD_MANAGER_DELEGATE_H_
 | |
| #pragma once
 | |
| 
 | |
| #include <memory>
 | |
| 
 | |
| #include "content/public/browser/download_manager_delegate.h"
 | |
| 
 | |
| namespace content {
 | |
| class DownloadManager;
 | |
| }  // namespace content
 | |
| 
 | |
| namespace cef {
 | |
| 
 | |
| 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);
 | |
| 
 | |
|  private:
 | |
|   // Allow deletion via std::unique_ptr only.
 | |
|   friend std::default_delete<DownloadManagerDelegate>;
 | |
| };
 | |
| 
 | |
| }  // namespace cef
 | |
| 
 | |
| #endif  // CEF_LIBCEF_BROWSER_DOWNLOAD_MANAGER_DELEGATE_H_
 |