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

Unified Diff: content/browser/tab_contents/tab_contents_unittest.cc

Issue 9288074: Rename WebUIFactory to WebUIControllerFactory since that's what it creates now. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: blah 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
« no previous file with comments | « content/browser/tab_contents/tab_contents.cc ('k') | content/browser/webui/empty_web_ui_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/tab_contents/tab_contents_unittest.cc
===================================================================
--- content/browser/tab_contents/tab_contents_unittest.cc (revision 119190)
+++ content/browser/tab_contents/tab_contents_unittest.cc (working copy)
@@ -12,13 +12,13 @@
#include "content/browser/tab_contents/interstitial_page.h"
#include "content/browser/tab_contents/navigation_entry_impl.h"
#include "content/browser/tab_contents/test_tab_contents.h"
-#include "content/browser/webui/empty_web_ui_factory.h"
#include "content/common/view_messages.h"
#include "content/public/browser/navigation_details.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/web_ui_controller.h"
+#include "content/public/browser/web_ui_controller_factory.h"
#include "content/public/common/bindings_policy.h"
#include "content/public/common/content_constants.h"
#include "content/public/common/url_constants.h"
@@ -26,37 +26,50 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "webkit/glue/webkit_glue.h"
+using content::BrowserContext;
using content::BrowserThread;
using content::NavigationEntry;
using content::NavigationEntryImpl;
using content::SiteInstance;
using content::WebContents;
+using content::WebUI;
using content::WebUIController;
using webkit::forms::PasswordForm;
namespace {
-class TabContentsTestWebUIFactory : public content::EmptyWebUIFactory {
+class TabContentsTestWebUIControllerFactory
+ : public content::WebUIControllerFactory {
public:
- virtual WebUIController* CreateWebUIForURL(content::WebUI* web_ui,
- const GURL& url) const OVERRIDE {
+ virtual WebUIController* CreateWebUIControllerForURL(
+ content::WebUI* web_ui, const GURL& url) const OVERRIDE {
if (!HasWebUIScheme(url))
return NULL;
return new WebUIController(web_ui);
}
- virtual bool UseWebUIForURL(content::BrowserContext* browser_context,
+ virtual WebUI::TypeID GetWebUIType(BrowserContext* browser_context,
+ const GURL& url) const OVERRIDE {
+ return WebUI::kNoWebUI;
+ }
+
+ virtual bool UseWebUIForURL(BrowserContext* browser_context,
const GURL& url) const OVERRIDE {
return HasWebUIScheme(url);
}
+ virtual bool UseWebUIBindingsForURL(BrowserContext* browser_context,
+ const GURL& url) const OVERRIDE {
+ return HasWebUIScheme(url);
+ }
+
virtual bool HasWebUIScheme(const GURL& url) const OVERRIDE {
return url.SchemeIs("tabcontentstest");
}
- virtual bool IsURLAcceptableForWebUI(content::BrowserContext* browser_context,
- const GURL& url) const {
+ virtual bool IsURLAcceptableForWebUI(
+ BrowserContext* browser_context, const GURL& url) const {
return HasWebUIScheme(url);
}
};
@@ -66,12 +79,13 @@
TabContentsTestBrowserClient() {
}
- virtual content::WebUIFactory* GetWebUIFactory() OVERRIDE {
+ virtual content::WebUIControllerFactory*
+ GetWebUIControllerFactory() OVERRIDE {
return &factory_;
}
private:
- TabContentsTestWebUIFactory factory_;
+ TabContentsTestWebUIControllerFactory factory_;
};
class TestInterstitialPage : public InterstitialPage {
« no previous file with comments | « content/browser/tab_contents/tab_contents.cc ('k') | content/browser/webui/empty_web_ui_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698