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

Unified Diff: chrome/browser/dom_ui/chrome_url_data_manager.cc

Issue 40222: Serve developer tools content from chrome-ui://devtools url (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 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/browser/debugger/dev_tools_view.cc ('k') | chrome/common/url_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/chrome_url_data_manager.cc
===================================================================
--- chrome/browser/dom_ui/chrome_url_data_manager.cc (revision 11106)
+++ chrome/browser/dom_ui/chrome_url_data_manager.cc (working copy)
@@ -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 @@
}
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 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
« no previous file with comments | « chrome/browser/debugger/dev_tools_view.cc ('k') | chrome/common/url_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698