Built UserAgent according to OS And Product.
[platform/framework/web/crosswalk-tizen.git] / atom / browser / atom_web_ui_controller_factory.h
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.
4
5 #ifndef ATOM_BROWSER_ATOM_WEB_UI_CONTROLLER_FACTORY_H_
6 #define ATOM_BROWSER_ATOM_WEB_UI_CONTROLLER_FACTORY_H_
7
8 #include "base/macros.h"
9 #include "base/memory/singleton.h"
10 #include "content/public/browser/web_ui_controller_factory.h"
11
12 namespace atom {
13
14 class AtomWebUIControllerFactory : public content::WebUIControllerFactory {
15  public:
16   static AtomWebUIControllerFactory* GetInstance();
17
18   AtomWebUIControllerFactory();
19   virtual ~AtomWebUIControllerFactory();
20
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;
31
32  private:
33   friend struct base::DefaultSingletonTraits<AtomWebUIControllerFactory>;
34
35   DISALLOW_COPY_AND_ASSIGN(AtomWebUIControllerFactory);
36 };
37
38 }  // namespace atom
39
40 #endif  // ATOM_BROWSER_ATOM_WEB_UI_CONTROLLER_FACTORY_H_