file_manager_untrusted_ui.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // Copyright 2020 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. #ifndef ASH_WEBUI_FILE_MANAGER_FILE_MANAGER_UNTRUSTED_UI_H_
  5. #define ASH_WEBUI_FILE_MANAGER_FILE_MANAGER_UNTRUSTED_UI_H_
  6. #include "content/public/browser/webui_config.h"
  7. #include "ui/webui/untrusted_web_ui_controller.h"
  8. namespace content {
  9. class WebUI;
  10. } // namespace content
  11. namespace ash {
  12. namespace file_manager {
  13. // Class that stores properties for the chrome-untrusted://file-manager WebUI.
  14. class FileManagerUntrustedUIConfig : public content::WebUIConfig {
  15. public:
  16. FileManagerUntrustedUIConfig();
  17. ~FileManagerUntrustedUIConfig() override;
  18. std::unique_ptr<content::WebUIController> CreateWebUIController(
  19. content::WebUI* web_ui) override;
  20. };
  21. // WebUI for chrome-untrusted://file-manager, intended to be used by the file
  22. // manager when untrusted content needs to be processed.
  23. class FileManagerUntrustedUI : public ui::UntrustedWebUIController {
  24. public:
  25. explicit FileManagerUntrustedUI(content::WebUI* web_ui);
  26. FileManagerUntrustedUI(const FileManagerUntrustedUI&) = delete;
  27. FileManagerUntrustedUI& operator=(const FileManagerUntrustedUI&) = delete;
  28. ~FileManagerUntrustedUI() override;
  29. };
  30. } // namespace file_manager
  31. } // namespace ash
  32. #endif // ASH_WEBUI_FILE_MANAGER_FILE_MANAGER_UNTRUSTED_UI_H_