1 // Copyright (c) 2017 GitHub, Inc.
2 // Use of this source code is governed by the MIT license that can be
3 // found in the LICENSE file.
5 #ifndef ATOM_BROWSER_ATOM_WEB_UI_CONTROLLER_FACTORY_H_
6 #define ATOM_BROWSER_ATOM_WEB_UI_CONTROLLER_FACTORY_H_
8 #include "base/macros.h"
9 #include "base/memory/singleton.h"
10 #include "content/public/browser/web_ui_controller_factory.h"
14 class AtomWebUIControllerFactory : public content::WebUIControllerFactory {
16 static AtomWebUIControllerFactory* GetInstance();
18 AtomWebUIControllerFactory();
19 virtual ~AtomWebUIControllerFactory();
21 // content::WebUIControllerFactory:
22 content::WebUI::TypeID GetWebUIType(content::BrowserContext* browser_context,
23 const GURL& url) const override;
24 bool UseWebUIForURL(content::BrowserContext* browser_context,
25 const GURL& url) const override;
26 bool UseWebUIBindingsForURL(content::BrowserContext* browser_context,
27 const GURL& url) const override;
28 content::WebUIController* CreateWebUIControllerForURL(
29 content::WebUI* web_ui,
30 const GURL& url) const override;
33 friend struct base::DefaultSingletonTraits<AtomWebUIControllerFactory>;
35 DISALLOW_COPY_AND_ASSIGN(AtomWebUIControllerFactory);
40 #endif // ATOM_BROWSER_ATOM_WEB_UI_CONTROLLER_FACTORY_H_