| 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/browser/webui/web_ui_factory.h" | 9 #include "content/browser/webui/web_ui_factory.h" |
| 10 | 10 |
| 11 namespace content { | 11 namespace content { |
| 12 | 12 |
| 13 // A stubbed out version of WebUIFactory. | 13 // A stubbed out version of WebUIFactory. |
| 14 class EmptyWebUIFactory : public content::WebUIFactory { | 14 class EmptyWebUIFactory : public content::WebUIFactory { |
| 15 public: | 15 public: |
| 16 // Returns the singleton instance. | 16 // Returns the singleton instance. |
| 17 static EmptyWebUIFactory* GetInstance(); | 17 static EmptyWebUIFactory* GetInstance(); |
| 18 | 18 |
| 19 virtual WebUI* CreateWebUIForURL(TabContents* source, | 19 virtual WebUI* CreateWebUIForURL(TabContents* source, |
| 20 const GURL& url) const; | 20 const GURL& url) const OVERRIDE; |
| 21 virtual WebUI::TypeID GetWebUIType(Profile* profile, | 21 virtual WebUI::TypeID GetWebUIType(content::BrowserContext* browser_context, |
| 22 const GURL& url) const; | 22 const GURL& url) const OVERRIDE; |
| 23 virtual bool UseWebUIForURL(Profile* profile, const GURL& url) const; | 23 virtual bool UseWebUIForURL(content::BrowserContext* browser_context, |
| 24 virtual bool HasWebUIScheme(const GURL& url) const; | 24 const GURL& url) const OVERRIDE; |
| 25 virtual bool IsURLAcceptableForWebUI(Profile* profile, | 25 virtual bool HasWebUIScheme(const GURL& url) const OVERRIDE; |
| 26 const GURL& url) const; | 26 virtual bool IsURLAcceptableForWebUI(content::BrowserContext* browser_context, |
| 27 const GURL& url) const OVERRIDE; |
| 27 | 28 |
| 28 protected: | 29 protected: |
| 29 EmptyWebUIFactory(); | 30 EmptyWebUIFactory(); |
| 30 virtual ~EmptyWebUIFactory(); | 31 virtual ~EmptyWebUIFactory(); |
| 31 | 32 |
| 32 private: | 33 private: |
| 33 friend struct DefaultSingletonTraits<EmptyWebUIFactory>; | 34 friend struct DefaultSingletonTraits<EmptyWebUIFactory>; |
| 34 }; | 35 }; |
| 35 | 36 |
| 36 } // namespace content | 37 } // namespace content |
| 37 | 38 |
| 38 #endif // CONTENT_BROWSER_WEBUI_EMPTY_WEB_UI_FACTORY_H_ | 39 #endif // CONTENT_BROWSER_WEBUI_EMPTY_WEB_UI_FACTORY_H_ |
| OLD | NEW |