From cc4875592f172e4b9eba3ab4df1e10832592cd10 Mon Sep 17 00:00:00 2001 From: "yurys@google.com" Date: Fri, 6 Mar 2009 14:44:35 +0000 Subject: - Developer tools frontend is served from chrom-ui://devtools/tools.html - Serve Web Inspector JS files from chrom-ui://devtools/ domain in addition to chrom-ui://inspector/. We cannot simply reuse "inspector" domain for now as we need different tab content types for console debugger and new developer tools front-end. When developer tools support all console debugger and web inspector features we will remove "inspector" domain from the source list. Review URL: http://codereview.chromium.org/40222 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11109 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/dom_ui/chrome_url_data_manager.cc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'chrome/browser/dom_ui') diff --git a/chrome/browser/dom_ui/chrome_url_data_manager.cc b/chrome/browser/dom_ui/chrome_url_data_manager.cc index 532c117..d0e4193 100644 --- a/chrome/browser/dom_ui/chrome_url_data_manager.cc +++ b/chrome/browser/dom_ui/chrome_url_data_manager.cc @@ -12,6 +12,7 @@ #include "chrome/browser/browser_process.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/ref_counted_util.h" +#include "chrome/common/url_constants.h" #include "googleurl/src/url_util.h" #include "net/url_request/url_request.h" #include "net/url_request/url_request_file_job.h" @@ -97,8 +98,14 @@ void RegisterURLRequestChromeJob() { } std::wstring inspector_dir; - if (PathService::Get(chrome::DIR_INSPECTOR, &inspector_dir)) + if (PathService::Get(chrome::DIR_INSPECTOR, &inspector_dir)) { + // TODO(yurys): remove "inspector" source when new developer tools support + // all features of in-process Web Inspector and Console Debugger. For the + // time being we need to serve the same content from chrome-ui://inspector + // for the Console Debugger and in-process Web Inspector. chrome_url_data_manager.AddFileSource("inspector", inspector_dir); + chrome_url_data_manager.AddFileSource(chrome::kDevToolsHost, inspector_dir); + } URLRequest::RegisterProtocolFactory(kChromeURLScheme, &ChromeURLDataManager::Factory); @@ -111,8 +118,10 @@ void RegisterURLRequestChromeJob() { void UnregisterURLRequestChromeJob() { std::wstring inspector_dir; - if (PathService::Get(chrome::DIR_INSPECTOR, &inspector_dir)) + if (PathService::Get(chrome::DIR_INSPECTOR, &inspector_dir)) { chrome_url_data_manager.RemoveFileSource("inspector"); + chrome_url_data_manager.RemoveFileSource(chrome::kDevToolsHost); + } } // static -- cgit v1.1