summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryurys@google.com <yurys@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-06 14:44:35 +0000
committeryurys@google.com <yurys@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-06 14:44:35 +0000
commitcc4875592f172e4b9eba3ab4df1e10832592cd10 (patch)
treed43c25c30ede1d121b77744d0801fc531dfaad47
parent44cbad8cfab5fd9356312b36b5d106d1f5fe1735 (diff)
downloadchromium_src-cc4875592f172e4b9eba3ab4df1e10832592cd10.zip
chromium_src-cc4875592f172e4b9eba3ab4df1e10832592cd10.tar.gz
chromium_src-cc4875592f172e4b9eba3ab4df1e10832592cd10.tar.bz2
- 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
-rw-r--r--chrome/browser/debugger/dev_tools_view.cc8
-rw-r--r--chrome/browser/dom_ui/chrome_url_data_manager.cc13
-rw-r--r--chrome/common/url_constants.cc1
-rw-r--r--chrome/common/url_constants.h1
4 files changed, 20 insertions, 3 deletions
diff --git a/chrome/browser/debugger/dev_tools_view.cc b/chrome/browser/debugger/dev_tools_view.cc
index 4eab83b..4b2f51d 100644
--- a/chrome/browser/debugger/dev_tools_view.cc
+++ b/chrome/browser/debugger/dev_tools_view.cc
@@ -4,12 +4,15 @@
#include "chrome/browser/debugger/dev_tools_view.h"
+#include <string>
+
#include "chrome/browser/browser_list.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/tab_contents/web_contents.h"
#include "chrome/browser/views/tab_contents_container_view.h"
#include "chrome/common/property_bag.h"
#include "chrome/common/render_messages.h"
+#include "chrome/common/url_constants.h"
DevToolsView::DevToolsView(int inspected_process_id, int inspected_view_id)
: inspected_process_id_(inspected_process_id),
@@ -68,7 +71,10 @@ void DevToolsView::Init() {
web_contents_->render_view_host()->SetInspectedView(inspected_process_id_,
inspected_view_id_);
- GURL contents("chrome-ui://inspector/debugger-oop.html");
+ // chrome-ui://devtools/tools.html
+ GURL contents(std::string(chrome::kChromeUIScheme) + "://" +
+ chrome::kDevToolsHost + "/tools.html");
+
// this will call CreateRenderView to create renderer process
web_contents_->controller()->LoadURL(contents, GURL(),
PageTransition::START_PAGE);
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
diff --git a/chrome/common/url_constants.cc b/chrome/common/url_constants.cc
index 62193b21..9f718ca 100644
--- a/chrome/common/url_constants.cc
+++ b/chrome/common/url_constants.cc
@@ -32,5 +32,6 @@ const char kChromeUINetworkURL[] = "chrome-ui://about/network";
const char kChromeUINewTabURL[] = "chrome-ui://newtab";
const char kNewTabHost[] = "newtab";
+const char kDevToolsHost[] = "devtools";
} // namespace chrome
diff --git a/chrome/common/url_constants.h b/chrome/common/url_constants.h
index 63989e9..6abc73d 100644
--- a/chrome/common/url_constants.h
+++ b/chrome/common/url_constants.h
@@ -40,6 +40,7 @@ extern const char kChromeUINewTabURL[];
// chrome-ui components of URLs.
extern const char kNewTabHost[];
+extern const char kDevToolsHost[];
} // namespace chrome