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

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 11783038: Allow multiple WebUIControllerFactory objects to be registered. This makes is possible to implement… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: reland after bogus revert of r175971 Created 7 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 | « chrome/test/base/chrome_test_suite.cc ('k') | content/browser/site_instance_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_process_host_impl.cc
===================================================================
--- content/browser/renderer_host/render_process_host_impl.cc (revision 179096)
+++ content/browser/renderer_host/render_process_host_impl.cc (working copy)
@@ -85,6 +85,7 @@
#include "content/browser/speech/input_tag_speech_dispatcher_host.h"
#include "content/browser/speech/speech_recognition_dispatcher_host.h"
#include "content/browser/trace_message_filter.h"
+#include "content/browser/webui/web_ui_controller_factory_registry.h"
#include "content/browser/worker_host/worker_storage_partition.h"
#include "content/browser/worker_host/worker_message_filter.h"
#include "content/common/child_process_host_impl.h"
@@ -99,7 +100,6 @@
#include "content/public/browser/render_process_host_factory.h"
#include "content/public/browser/resource_context.h"
#include "content/public/browser/user_metrics.h"
-#include "content/public/browser/web_ui_controller_factory.h"
#include "content/public/common/content_constants.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/process_type.h"
@@ -1286,12 +1286,10 @@
if (!host->IsGuest() && site_url.SchemeIs(chrome::kGuestScheme))
return false;
- WebUIControllerFactory* factory =
- GetContentClient()->browser()->GetWebUIControllerFactory();
- if (factory &&
- ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings(
+ if (ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings(
host->GetID()) !=
- factory->UseWebUIBindingsForURL(browser_context, site_url)) {
+ WebUIControllerFactoryRegistry::GetInstance()->UseWebUIBindingsForURL(
+ browser_context, site_url)) {
return false;
}
@@ -1407,10 +1405,8 @@
}
// DevTools pages have WebUI type but should not reuse the same host.
- WebUIControllerFactory* factory =
- GetContentClient()->browser()->GetWebUIControllerFactory();
- if (factory &&
- factory->UseWebUIForURL(browser_context, url) &&
+ if (WebUIControllerFactoryRegistry::GetInstance()->UseWebUIForURL(
+ browser_context, url) &&
!url.SchemeIs(chrome::kChromeDevToolsScheme)) {
return true;
}
« no previous file with comments | « chrome/test/base/chrome_test_suite.cc ('k') | content/browser/site_instance_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698