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

Unified Diff: content/browser/tab_contents/render_view_host_manager_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
Index: content/browser/tab_contents/render_view_host_manager_unittest.cc
===================================================================
--- content/browser/tab_contents/render_view_host_manager_unittest.cc (revision 119190)
+++ content/browser/tab_contents/render_view_host_manager_unittest.cc (working copy)
@@ -11,13 +11,13 @@
#include "content/browser/tab_contents/navigation_entry_impl.h"
#include "content/browser/tab_contents/render_view_host_manager.h"
#include "content/browser/tab_contents/test_tab_contents.h"
-#include "content/browser/webui/empty_web_ui_factory.h"
#include "content/common/test_url_constants.h"
#include "content/common/view_messages.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "content/public/browser/web_ui_controller.h"
+#include "content/public/browser/web_ui_controller_factory.h"
#include "content/public/common/page_transition_types.h"
#include "content/public/common/url_constants.h"
#include "content/test/test_browser_context.h"
@@ -26,6 +26,7 @@
#include "googleurl/src/url_util.h"
#include "webkit/glue/webkit_glue.h"
+using content::BrowserContext;
using content::BrowserThread;
using content::BrowserThreadImpl;
using content::NavigationController;
@@ -33,38 +34,44 @@
using content::NavigationEntryImpl;
using content::SiteInstance;
using content::WebContents;
+using content::WebUI;
using content::WebUIController;
namespace {
const char kChromeUISchemeButNotWebUIURL[] = "chrome://not-webui";
-class RenderViewHostManagerTestWebUIFactory
- : public content::EmptyWebUIFactory {
+class RenderViewHostManagerTestWebUIControllerFactory
+ : public content::WebUIControllerFactory {
public:
- RenderViewHostManagerTestWebUIFactory()
+ RenderViewHostManagerTestWebUIControllerFactory()
: should_create_webui_(false) {
}
- virtual ~RenderViewHostManagerTestWebUIFactory() {}
+ virtual ~RenderViewHostManagerTestWebUIControllerFactory() {}
void set_should_create_webui(bool should_create_webui) {
should_create_webui_ = should_create_webui;
}
// WebUIFactory implementation.
- virtual WebUIController* CreateWebUIForURL(content::WebUI* web_ui,
- const GURL& url) const OVERRIDE {
+ virtual WebUIController* CreateWebUIControllerForURL(
+ WebUI* web_ui, const GURL& url) const OVERRIDE {
if (!(should_create_webui_ && 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(content::BrowserContext* browser_context,
+ virtual bool UseWebUIBindingsForURL(BrowserContext* browser_context,
const GURL& url) const OVERRIDE {
return HasWebUIScheme(url);
}
@@ -74,10 +81,15 @@
url.spec() != kChromeUISchemeButNotWebUIURL;
}
+ virtual bool IsURLAcceptableForWebUI(BrowserContext* browser_context,
+ const GURL& url) const OVERRIDE {
+ return false;
+ }
+
private:
bool should_create_webui_;
- DISALLOW_COPY_AND_ASSIGN(RenderViewHostManagerTestWebUIFactory);
+ DISALLOW_COPY_AND_ASSIGN(RenderViewHostManagerTestWebUIControllerFactory);
};
class RenderViewHostManagerTestBrowserClient
@@ -91,12 +103,13 @@
}
// content::MockContentBrowserClient implementation.
- virtual content::WebUIFactory* GetWebUIFactory() OVERRIDE {
+ virtual content::WebUIControllerFactory*
+ GetWebUIControllerFactory() OVERRIDE {
return &factory_;
}
private:
- RenderViewHostManagerTestWebUIFactory factory_;
+ RenderViewHostManagerTestWebUIControllerFactory factory_;
DISALLOW_COPY_AND_ASSIGN(RenderViewHostManagerTestBrowserClient);
};
« no previous file with comments | « content/browser/tab_contents/render_view_host_manager.cc ('k') | content/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698