1 // Copyright 2014 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.
5 #ifndef ATHENA_VIRTUAL_KEYBOARD_VK_WEBUI_CONTROLLER_H_
6 #define ATHENA_VIRTUAL_KEYBOARD_VK_WEBUI_CONTROLLER_H_
8 #include "base/macros.h"
9 #include "base/memory/singleton.h"
10 #include "content/public/browser/web_ui_controller.h"
11 #include "content/public/browser/web_ui_controller_factory.h"
15 class VKWebUIController
: public content::WebUIController
{
17 explicit VKWebUIController(content::WebUI
* web_ui
);
18 virtual ~VKWebUIController();
21 DISALLOW_COPY_AND_ASSIGN(VKWebUIController
);
24 class VKWebUIControllerFactory
: public content::WebUIControllerFactory
{
26 // WebUIControllerFactory:
27 virtual content::WebUI::TypeID
GetWebUIType(
28 content::BrowserContext
* browser_context
,
29 const GURL
& url
) const OVERRIDE
;
30 virtual bool UseWebUIForURL(content::BrowserContext
* browser_context
,
31 const GURL
& url
) const OVERRIDE
;
32 virtual bool UseWebUIBindingsForURL(content::BrowserContext
* browser_context
,
33 const GURL
& url
) const OVERRIDE
;
34 virtual content::WebUIController
* CreateWebUIControllerForURL(
35 content::WebUI
* web_ui
,
36 const GURL
& url
) const OVERRIDE
;
38 static VKWebUIControllerFactory
* GetInstance();
41 VKWebUIControllerFactory();
42 virtual ~VKWebUIControllerFactory();
45 friend struct DefaultSingletonTraits
<VKWebUIControllerFactory
>;
47 DISALLOW_COPY_AND_ASSIGN(VKWebUIControllerFactory
);
52 #endif // ATHENA_VIRTUAL_KEYBOARD_VK_WEBUI_CONTROLLER_H_