OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #ifndef ATHENA_VIRTUAL_KEYBOARD_VK_WEBUI_CONTROLLER_H_ |
| 6 #define ATHENA_VIRTUAL_KEYBOARD_VK_WEBUI_CONTROLLER_H_ |
| 7 |
| 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" |
| 12 |
| 13 namespace athena { |
| 14 |
| 15 class VKWebUIController : public content::WebUIController { |
| 16 public: |
| 17 explicit VKWebUIController(content::WebUI* web_ui); |
| 18 virtual ~VKWebUIController(); |
| 19 |
| 20 private: |
| 21 DISALLOW_COPY_AND_ASSIGN(VKWebUIController); |
| 22 }; |
| 23 |
| 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; |
| 37 |
| 38 static VKWebUIControllerFactory* GetInstance(); |
| 39 |
| 40 protected: |
| 41 VKWebUIControllerFactory(); |
| 42 virtual ~VKWebUIControllerFactory(); |
| 43 |
| 44 private: |
| 45 friend struct DefaultSingletonTraits<VKWebUIControllerFactory>; |
| 46 |
| 47 DISALLOW_COPY_AND_ASSIGN(VKWebUIControllerFactory); |
| 48 }; |
| 49 |
| 50 } // namespace athena |
| 51 |
| 52 #endif // ATHENA_VIRTUAL_KEYBOARD_VK_WEBUI_CONTROLLER_H_ |
OLD | NEW |