Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(999)

Side by Side Diff: chrome/browser/ui/webui/test_chrome_web_ui_factory.h

Issue 9150021: Rename WebUI to WebUIImpl. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 CHROME_BROWSER_UI_WEBUI_TEST_CHROME_WEB_UI_FACTORY_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_TEST_CHROME_WEB_UI_FACTORY_H_
6 #define CHROME_BROWSER_UI_WEBUI_TEST_CHROME_WEB_UI_FACTORY_H_ 6 #define CHROME_BROWSER_UI_WEBUI_TEST_CHROME_WEB_UI_FACTORY_H_
7 #pragma once 7 #pragma once
8 8
9 #include <functional> 9 #include <functional>
10 #include <map> 10 #include <map>
(...skipping 21 matching lines...) Expand all
32 typedef std::map<std::string, WebUIProvider*> FactoryOverridesMap; 32 typedef std::map<std::string, WebUIProvider*> FactoryOverridesMap;
33 33
34 // Override the creation for urls having |host| with |provider|. 34 // Override the creation for urls having |host| with |provider|.
35 static void AddFactoryOverride(const std::string& host, 35 static void AddFactoryOverride(const std::string& host,
36 WebUIProvider* provider); 36 WebUIProvider* provider);
37 37
38 // Remove the override for urls having |host|. 38 // Remove the override for urls having |host|.
39 static void RemoveFactoryOverride(const std::string& host); 39 static void RemoveFactoryOverride(const std::string& host);
40 40
41 // ChromeWebUIFactory overrides. 41 // ChromeWebUIFactory overrides.
42 virtual WebUI::TypeID GetWebUIType(content::BrowserContext* browser_context, 42 virtual content::WebUI::TypeID GetWebUIType(
43 const GURL& url) const OVERRIDE; 43 content::BrowserContext* browser_context,
44 const GURL& url) const OVERRIDE;
44 virtual content::WebUIController* CreateWebUIForURL( 45 virtual content::WebUIController* CreateWebUIForURL(
45 content::WebUI* web_ui, const GURL& url) const OVERRIDE; 46 content::WebUI* web_ui, const GURL& url) const OVERRIDE;
46 47
47 // Return the singleton instance. 48 // Return the singleton instance.
48 static TestChromeWebUIFactory* GetInstance(); 49 static TestChromeWebUIFactory* GetInstance();
49 50
50 private: 51 private:
51 TestChromeWebUIFactory(); 52 TestChromeWebUIFactory();
52 virtual ~TestChromeWebUIFactory(); 53 virtual ~TestChromeWebUIFactory();
53 54
54 friend struct DefaultSingletonTraits<TestChromeWebUIFactory>; 55 friend struct DefaultSingletonTraits<TestChromeWebUIFactory>;
55 56
56 // Return the WebUIProvider for the |url|'s host if it exists, otherwise NULL. 57 // Return the WebUIProvider for the |url|'s host if it exists, otherwise NULL.
57 WebUIProvider* GetWebUIProvider(Profile* profile, const GURL& url) const; 58 WebUIProvider* GetWebUIProvider(Profile* profile, const GURL& url) const;
58 59
59 // Stores the mapping of host to WebUIProvider. 60 // Stores the mapping of host to WebUIProvider.
60 FactoryOverridesMap factory_overrides_; 61 FactoryOverridesMap factory_overrides_;
61 62
62 DISALLOW_COPY_AND_ASSIGN(TestChromeWebUIFactory); 63 DISALLOW_COPY_AND_ASSIGN(TestChromeWebUIFactory);
63 }; 64 };
64 65
65 #endif // CHROME_BROWSER_UI_WEBUI_TEST_CHROME_WEB_UI_FACTORY_H_ 66 #endif // CHROME_BROWSER_UI_WEBUI_TEST_CHROME_WEB_UI_FACTORY_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chrome_web_ui_factory.cc ('k') | chrome/browser/ui/webui/test_chrome_web_ui_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698