| // Copyright 2022 The Chromium Authors | |
| // Use of this source code is governed by a BSD-style license that can be | |
| // found in the LICENSE file. | |
| #ifndef UI_WEBUI_EXAMPLES_BROWSER_BROWSER_CONTEXT_H_ | |
| #define UI_WEBUI_EXAMPLES_BROWSER_BROWSER_CONTEXT_H_ | |
| #include <memory> | |
| #include "base/files/file_path.h" | |
| #include "build/build_config.h" | |
| #include "content/public/browser/browser_context.h" | |
| namespace webui_examples { | |
| class BrowserContext : public content::BrowserContext { | |
| public: | |
| explicit BrowserContext(const base::FilePath& temp_dir_path); | |
| BrowserContext(const BrowserContext&) = delete; | |
| BrowserContext& operator=(const BrowserContext&) = delete; | |
| ~BrowserContext() override; | |
| private: | |
| // content::BrowserContext: | |
| std::unique_ptr<content::ZoomLevelDelegate> CreateZoomLevelDelegate( | |
| const base::FilePath& partition_path) override; | |
| base::FilePath GetPath() const override; | |
| bool IsOffTheRecord() override; | |
| content::DownloadManagerDelegate* GetDownloadManagerDelegate() override; | |
| content::BrowserPluginGuestManager* GetGuestManager() override; | |
| storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override; | |
| content::PlatformNotificationService* GetPlatformNotificationService() | |
| override; | |
| content::PushMessagingService* GetPushMessagingService() override; | |
| content::StorageNotificationService* GetStorageNotificationService() override; | |
| content::SSLHostStateDelegate* GetSSLHostStateDelegate() override; | |
| content::PermissionControllerDelegate* GetPermissionControllerDelegate() | |
| override; | |
| content::ClientHintsControllerDelegate* GetClientHintsControllerDelegate() | |
| override; | |
| content::BackgroundFetchDelegate* GetBackgroundFetchDelegate() override; | |
| content::BackgroundSyncController* GetBackgroundSyncController() override; | |
| content::BrowsingDataRemoverDelegate* GetBrowsingDataRemoverDelegate() | |
| override; | |
| const base::FilePath temp_dir_path_; | |
| }; | |
| } // namespace webui_examples | |
| #endif // UI_WEBUI_EXAMPLES_BROWSER_BROWSER_CONTEXT_H_ |