Instrumented libraries: improve handling of custom patches.
[chromium-blink-merge.git] / athena / virtual_keyboard / vk_webui_controller.h
blobc2c6ecc3a2b8d7bcd257e7f8951ee098101bc666
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"
13 namespace athena {
15 class VKWebUIController : public content::WebUIController {
16 public:
17 explicit VKWebUIController(content::WebUI* web_ui);
18 virtual ~VKWebUIController();
20 private:
21 DISALLOW_COPY_AND_ASSIGN(VKWebUIController);
24 class VKWebUIControllerFactory : public content::WebUIControllerFactory {
25 public:
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();
40 protected:
41 VKWebUIControllerFactory();
42 virtual ~VKWebUIControllerFactory();
44 private:
45 friend struct DefaultSingletonTraits<VKWebUIControllerFactory>;
47 DISALLOW_COPY_AND_ASSIGN(VKWebUIControllerFactory);
50 } // namespace athena
52 #endif // ATHENA_VIRTUAL_KEYBOARD_VK_WEBUI_CONTROLLER_H_