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

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

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.cc
===================================================================
--- chrome/browser/ui/webui/test_chrome_web_ui_factory.cc (revision 117871)
+++ chrome/browser/ui/webui/test_chrome_web_ui_factory.cc (working copy)
@@ -8,6 +8,7 @@
#include "content/public/browser/web_contents.h"
using content::WebContents;
+using content::WebUIController;
TestChromeWebUIFactory::WebUIProvider::~WebUIProvider() {
}
@@ -37,13 +38,13 @@
ChromeWebUIFactory::GetWebUIType(profile, url);
}
-WebUI* TestChromeWebUIFactory::CreateWebUIForURL(WebContents* web_contents,
- const GURL& url) const {
+WebUIController* TestChromeWebUIFactory::CreateWebUIForURL(
+ WebUI* web_ui, const GURL& url) const {
Profile* profile =
- Profile::FromBrowserContext(web_contents->GetBrowserContext());
+ Profile::FromBrowserContext(web_ui->web_contents()->GetBrowserContext());
WebUIProvider* provider = GetWebUIProvider(profile, url);
- return provider ? provider->NewWebUI(web_contents, url) :
- ChromeWebUIFactory::CreateWebUIForURL(web_contents, url);
+ return provider ? provider->NewWebUI(web_ui, url) :
+ ChromeWebUIFactory::CreateWebUIForURL(web_ui, url);
}
TestChromeWebUIFactory* TestChromeWebUIFactory::GetInstance() {

Powered by Google App Engine
This is Rietveld 408576698