diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-10 01:42:31 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-10 01:42:31 +0000 |
commit | d6ef7684df0f0699bbeb5baceb69998fecd2c36d (patch) | |
tree | 986df4b654309cfabefbc778bd2f8665b3d8b5ba /chrome/browser | |
parent | bd132983c14c2bc63098578027c9596b397f9f4e (diff) | |
download | chromium_src-d6ef7684df0f0699bbeb5baceb69998fecd2c36d.zip chromium_src-d6ef7684df0f0699bbeb5baceb69998fecd2c36d.tar.gz chromium_src-d6ef7684df0f0699bbeb5baceb69998fecd2c36d.tar.bz2 |
Revert 175890: actually, looks like we want this to also help move chromeos webui pages out of src/chrome.
> Revert 175822
>
> After more investigation of what it would take to share the webui code framework from chrome with content, it didn't seam feasible to do this. The code in chrome (i.e. ChromeURLDataManager) is heavily tied to chrome, and is used by chrome for non-webui stuff. The JS code is also specific to Chrome. It seems better to not bring in all this stuff to content.
>
> > Allow multiple WebUIControllerFactory objects to be registered. This makes is possible to implement webui inside content.
> > Review URL: https://codereview.chromium.org/11783038
>
> TBR=jam@chromium.org
> Review URL: https://codereview.chromium.org/11818036
TBR=jam@chromium.org
Review URL: https://codereview.chromium.org/11819050
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175971 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
5 files changed, 11 insertions, 12 deletions
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc index 07e9876..25a7a4c 100644 --- a/chrome/browser/chrome_browser_main.cc +++ b/chrome/browser/chrome_browser_main.cc @@ -92,6 +92,7 @@ #include "chrome/browser/ui/uma_browsing_activity_observer.h" #include "chrome/browser/ui/user_data_dir_dialog.h" #include "chrome/browser/ui/webui/chrome_url_data_manager_backend.h" +#include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" #include "chrome/common/child_process_logging.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_paths.h" @@ -1391,6 +1392,9 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { g_browser_process->profile_manager()->GetLastOpenedProfiles(); #endif + content::WebUIControllerFactory::RegisterFactory( + ChromeWebUIControllerFactory::GetInstance()); + if (browser_creator_->Start(parsed_command_line(), FilePath(), profile_, last_opened_profiles, &result_code)) { #if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc index 53ab0ed..475e3cd 100644 --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc @@ -625,11 +625,6 @@ void ChromeContentBrowserClient::RenderProcessHostCreated( #endif } -content::WebUIControllerFactory* - ChromeContentBrowserClient::GetWebUIControllerFactory() { - return ChromeWebUIControllerFactory::GetInstance(); -} - GURL ChromeContentBrowserClient::GetEffectiveURL( content::BrowserContext* browser_context, const GURL& url) { Profile* profile = Profile::FromBrowserContext(browser_context); diff --git a/chrome/browser/chrome_content_browser_client.h b/chrome/browser/chrome_content_browser_client.h index 468bd3b..3113f6e 100644 --- a/chrome/browser/chrome_content_browser_client.h +++ b/chrome/browser/chrome_content_browser_client.h @@ -62,7 +62,6 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { content::RenderViewHost* render_view_host) OVERRIDE; virtual void RenderProcessHostCreated( content::RenderProcessHost* host) OVERRIDE; - virtual content::WebUIControllerFactory* GetWebUIControllerFactory() OVERRIDE; virtual bool ShouldUseProcessPerSite(content::BrowserContext* browser_context, const GURL& effective_url) OVERRIDE; virtual GURL GetEffectiveURL(content::BrowserContext* browser_context, diff --git a/chrome/browser/extensions/api/debugger/debugger_api.cc b/chrome/browser/extensions/api/debugger/debugger_api.cc index 79b28b7..2342691 100644 --- a/chrome/browser/extensions/api/debugger/debugger_api.cc +++ b/chrome/browser/extensions/api/debugger/debugger_api.cc @@ -36,6 +36,7 @@ #include "content/public/browser/render_view_host.h" #include "content/public/browser/web_contents.h" #include "content/public/common/content_client.h" +#include "content/public/common/url_constants.h" #include "extensions/common/error_utils.h" #include "grit/generated_resources.h" #include "ui/base/l10n/l10n_util.h" @@ -428,8 +429,7 @@ bool DebuggerFunction::InitWebContents() { } contents_ = web_contents; - if (content::GetContentClient()->HasWebUIScheme( - contents_->GetURL())) { + if (content::HasWebUIScheme(contents_->GetURL())) { error_ = ErrorUtils::FormatErrorMessage( keys::kAttachToWebUIError, contents_->GetURL().scheme()); diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc index 7b44b6b..f76498f 100644 --- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc +++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc @@ -35,9 +35,6 @@ #include "chrome/browser/ui/webui/instant_ui.h" #include "chrome/browser/ui/webui/local_omnibox_popup/local_omnibox_popup_ui.h" #include "chrome/browser/ui/webui/media/media_internals_ui.h" -#if !defined(DISABLE_NACL) -#include "chrome/browser/ui/webui/nacl_ui.h" -#endif #include "chrome/browser/ui/webui/net_internals/net_internals_ui.h" #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" #include "chrome/browser/ui/webui/omnibox/omnibox_ui.h" @@ -68,6 +65,10 @@ #include "ui/gfx/favicon_size.h" #include "ui/web_dialogs/web_dialog_ui.h" +#if !defined(DISABLE_NACL) +#include "chrome/browser/ui/webui/nacl_ui.h" +#endif + #if defined(ENABLE_CONFIGURATION_POLICY) #include "chrome/browser/ui/webui/policy_ui.h" #endif @@ -583,7 +584,7 @@ base::RefCountedMemory* ChromeWebUIControllerFactory::GetFaviconResourceBytes( } #endif - if (!content::GetContentClient()->HasWebUIScheme(page_url)) + if (!content::HasWebUIScheme(page_url)) return NULL; #if defined(OS_WIN) |