OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_BROWSER_WEBUI_EMPTY_WEB_UI_FACTORY_H_ | 5 #ifndef CONTENT_BROWSER_WEBUI_EMPTY_WEB_UI_FACTORY_H_ |
6 #define CONTENT_BROWSER_WEBUI_EMPTY_WEB_UI_FACTORY_H_ | 6 #define CONTENT_BROWSER_WEBUI_EMPTY_WEB_UI_FACTORY_H_ |
7 | 7 |
8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
10 #include "content/public/browser/web_ui_factory.h" | 10 #include "content/public/browser/web_ui_factory.h" |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 | 13 |
14 // A stubbed out version of WebUIFactory. | 14 // A stubbed out version of WebUIFactory. |
15 class CONTENT_EXPORT EmptyWebUIFactory : public content::WebUIFactory { | 15 class CONTENT_EXPORT EmptyWebUIFactory : public content::WebUIFactory { |
16 public: | 16 public: |
17 // Returns the singleton instance. | 17 // Returns the singleton instance. |
18 static EmptyWebUIFactory* GetInstance(); | 18 static EmptyWebUIFactory* GetInstance(); |
19 | 19 |
20 virtual WebUI* CreateWebUIForURL(WebContents* source, | 20 virtual WebUIController* CreateWebUIForURL(WebUI* web_ui, |
21 const GURL& url) const OVERRIDE; | 21 const GURL& url) const OVERRIDE; |
22 virtual WebUI::TypeID GetWebUIType(content::BrowserContext* browser_context, | 22 virtual WebUI::TypeID GetWebUIType(content::BrowserContext* browser_context, |
23 const GURL& url) const OVERRIDE; | 23 const GURL& url) const OVERRIDE; |
24 virtual bool UseWebUIForURL(content::BrowserContext* browser_context, | 24 virtual bool UseWebUIForURL(content::BrowserContext* browser_context, |
25 const GURL& url) const OVERRIDE; | 25 const GURL& url) const OVERRIDE; |
26 virtual bool UseWebUIBindingsForURL(content::BrowserContext* browser_context, | 26 virtual bool UseWebUIBindingsForURL(content::BrowserContext* browser_context, |
27 const GURL& url) const OVERRIDE; | 27 const GURL& url) const OVERRIDE; |
28 virtual bool HasWebUIScheme(const GURL& url) const OVERRIDE; | 28 virtual bool HasWebUIScheme(const GURL& url) const OVERRIDE; |
29 virtual bool IsURLAcceptableForWebUI(content::BrowserContext* browser_context, | 29 virtual bool IsURLAcceptableForWebUI(content::BrowserContext* browser_context, |
30 const GURL& url) const OVERRIDE; | 30 const GURL& url) const OVERRIDE; |
31 | 31 |
32 protected: | 32 protected: |
33 EmptyWebUIFactory(); | 33 EmptyWebUIFactory(); |
34 virtual ~EmptyWebUIFactory(); | 34 virtual ~EmptyWebUIFactory(); |
35 | 35 |
36 private: | 36 private: |
37 friend struct DefaultSingletonTraits<EmptyWebUIFactory>; | 37 friend struct DefaultSingletonTraits<EmptyWebUIFactory>; |
38 }; | 38 }; |
39 | 39 |
40 } // namespace content | 40 } // namespace content |
41 | 41 |
42 #endif // CONTENT_BROWSER_WEBUI_EMPTY_WEB_UI_FACTORY_H_ | 42 #endif // CONTENT_BROWSER_WEBUI_EMPTY_WEB_UI_FACTORY_H_ |
OLD | NEW |