devtools_ui.cc 885 B

12345678910111213141516171819202122232425
  1. // Copyright (c) 2012 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-CHROMIUM file.
  4. #include "shell/browser/ui/devtools_ui.h"
  5. #include <memory>
  6. #include "content/public/browser/web_ui.h"
  7. #include "shell/browser/ui/devtools_ui_bundle_data_source.h"
  8. #include "shell/browser/ui/devtools_ui_theme_data_source.h"
  9. namespace electron {
  10. DevToolsUI::DevToolsUI(content::BrowserContext* browser_context,
  11. content::WebUI* web_ui)
  12. : WebUIController(web_ui) {
  13. web_ui->SetBindings(content::BindingsPolicySet());
  14. content::URLDataSource::Add(browser_context,
  15. std::make_unique<BundledDataSource>());
  16. content::URLDataSource::Add(browser_context,
  17. std::make_unique<ThemeDataSource>());
  18. }
  19. } // namespace electron