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

Unified Diff: chrome/browser/ui/webui/test_chrome_web_ui_factory.h

Issue 9224002: Make WebUI objects not derive from WebUI. WebUI objects own the controller. This is the ownership... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync to head to clear linux_chromeos browsertest failures 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/test_chrome_web_ui_factory.h
===================================================================
--- chrome/browser/ui/webui/test_chrome_web_ui_factory.h (revision 117871)
+++ chrome/browser/ui/webui/test_chrome_web_ui_factory.h (working copy)
@@ -13,9 +13,6 @@
#include "chrome/browser/ui/webui/chrome_web_ui_factory.h"
#include "content/browser/webui/web_ui.h"
-class GURL;
-class Profile;
-
// This class replaces the ChromeWebUIFactory when the switches::kTestType flag
// is passed. It provides a registry to override CreateWebUIForURL() by host.
class TestChromeWebUIFactory : public ChromeWebUIFactory {
@@ -25,8 +22,8 @@
public:
// Create and return a new WebUI object for the |tab_contents| based on the
// |url|.
- virtual WebUI* NewWebUI(content::WebContents* tab_contents,
- const GURL& url) = 0;
+ virtual content::WebUIController* NewWebUI(WebUI* web_ui,
+ const GURL& url) = 0;
protected:
virtual ~WebUIProvider();
@@ -44,8 +41,8 @@
// ChromeWebUIFactory overrides.
virtual WebUI::TypeID GetWebUIType(content::BrowserContext* browser_context,
const GURL& url) const OVERRIDE;
- virtual WebUI* CreateWebUIForURL(content::WebContents* web_contents,
- const GURL& url) const OVERRIDE;
+ virtual content::WebUIController* CreateWebUIForURL(
+ WebUI* web_ui, const GURL& url) const OVERRIDE;
// Return the singleton instance.
static TestChromeWebUIFactory* GetInstance();

Powered by Google App Engine
This is Rietveld 408576698