diff options
author | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-27 16:38:13 +0000 |
---|---|---|
committer | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-27 16:38:13 +0000 |
commit | 6b9907e7f689c21ae84abf60caf43025089e6661 (patch) | |
tree | 11d32d837401e1496bd020742600948f50d3f15a /content/shell | |
parent | d5b528c5a418faaf40c5f1a33de4b829b95dba62 (diff) | |
download | chromium_src-6b9907e7f689c21ae84abf60caf43025089e6661.zip chromium_src-6b9907e7f689c21ae84abf60caf43025089e6661.tar.gz chromium_src-6b9907e7f689c21ae84abf60caf43025089e6661.tar.bz2 |
DevTools [remote debugging]: serve devtools front-end files from the bundle, never redirect to chrome-devtools://.
Review URL: https://chromiumcodereview.appspot.com/10986050
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159042 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/shell')
-rw-r--r-- | content/shell/shell_browser_main_parts.cc | 3 | ||||
-rw-r--r-- | content/shell/shell_devtools_delegate.cc | 11 | ||||
-rw-r--r-- | content/shell/shell_devtools_delegate.h | 9 | ||||
-rw-r--r-- | content/shell/shell_devtools_delegate_android.cc | 11 |
4 files changed, 9 insertions, 25 deletions
diff --git a/content/shell/shell_browser_main_parts.cc b/content/shell/shell_browser_main_parts.cc index 9e7108d..25e500f 100644 --- a/content/shell/shell_browser_main_parts.cc +++ b/content/shell/shell_browser_main_parts.cc @@ -127,8 +127,7 @@ void ShellBrowserMainParts::PreMainMessageLoopRun() { } } #endif - devtools_delegate_ = new ShellDevToolsDelegate( - port, browser_context_->GetRequestContext()); + devtools_delegate_ = new ShellDevToolsDelegate(port); if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) { Shell::CreateNewWindow(browser_context_.get(), diff --git a/content/shell/shell_devtools_delegate.cc b/content/shell/shell_devtools_delegate.cc index 2c20720..88821ef 100644 --- a/content/shell/shell_devtools_delegate.cc +++ b/content/shell/shell_devtools_delegate.cc @@ -13,14 +13,10 @@ namespace content { -ShellDevToolsDelegate::ShellDevToolsDelegate( - int port, - net::URLRequestContextGetter* context_getter) - : context_getter_(context_getter) { +ShellDevToolsDelegate::ShellDevToolsDelegate(int port) { devtools_http_handler_ = DevToolsHttpHandler::Start( new net::TCPListenSocketFactory("127.0.0.1", port), "", - context_getter_, this); } @@ -42,11 +38,10 @@ bool ShellDevToolsDelegate::BundlesFrontendResources() { return true; } -std::string ShellDevToolsDelegate::GetFrontendResourcesBaseURL() { - return ""; +FilePath ShellDevToolsDelegate::GetDebugFrontendDir() { + return FilePath(); } - std::string ShellDevToolsDelegate::GetPageThumbnailData(const GURL& url) { return ""; } diff --git a/content/shell/shell_devtools_delegate.h b/content/shell/shell_devtools_delegate.h index 1638247..19557c1 100644 --- a/content/shell/shell_devtools_delegate.h +++ b/content/shell/shell_devtools_delegate.h @@ -11,17 +11,13 @@ #include "base/compiler_specific.h" #include "content/public/browser/devtools_http_handler_delegate.h" -namespace net { -class URLRequestContextGetter; -} - namespace content { class DevToolsHttpHandler; class ShellDevToolsDelegate : public DevToolsHttpHandlerDelegate { public: - ShellDevToolsDelegate(int port, net::URLRequestContextGetter* context_getter); + explicit ShellDevToolsDelegate(int port); virtual ~ShellDevToolsDelegate(); // Stops http server. @@ -30,7 +26,7 @@ class ShellDevToolsDelegate : public DevToolsHttpHandlerDelegate { // DevToolsHttpProtocolHandler::Delegate overrides. virtual std::string GetDiscoveryPageHTML() OVERRIDE; virtual bool BundlesFrontendResources() OVERRIDE; - virtual std::string GetFrontendResourcesBaseURL() OVERRIDE; + virtual FilePath GetDebugFrontendDir() OVERRIDE; virtual std::string GetPageThumbnailData(const GURL& url) OVERRIDE; DevToolsHttpHandler* devtools_http_handler() { @@ -38,7 +34,6 @@ class ShellDevToolsDelegate : public DevToolsHttpHandlerDelegate { } private: - net::URLRequestContextGetter* context_getter_; DevToolsHttpHandler* devtools_http_handler_; DISALLOW_COPY_AND_ASSIGN(ShellDevToolsDelegate); diff --git a/content/shell/shell_devtools_delegate_android.cc b/content/shell/shell_devtools_delegate_android.cc index 38df1b4..7584c68 100644 --- a/content/shell/shell_devtools_delegate_android.cc +++ b/content/shell/shell_devtools_delegate_android.cc @@ -9,7 +9,6 @@ #include "content/public/browser/devtools_http_handler.h" #include "grit/shell_resources.h" #include "net/base/unix_domain_socket_posix.h" -#include "net/url_request/url_request_context_getter.h" #include "ui/base/layout.h" #include "ui/base/resource/resource_bundle.h" @@ -27,16 +26,12 @@ const char kFrontEndURL[] = namespace content { -ShellDevToolsDelegate::ShellDevToolsDelegate( - int port, - net::URLRequestContextGetter* context_getter) - : context_getter_(context_getter) { +ShellDevToolsDelegate::ShellDevToolsDelegate(int port) { devtools_http_handler_ = DevToolsHttpHandler::Start( new net::UnixDomainSocketWithAbstractNamespaceFactory( kSocketName, base::Bind(&CanUserConnectToDevTools)), StringPrintf(kFrontEndURL, kFrontendVersion), - context_getter, this); } @@ -58,8 +53,8 @@ bool ShellDevToolsDelegate::BundlesFrontendResources() { return false; } -std::string ShellDevToolsDelegate::GetFrontendResourcesBaseURL() { - return ""; +FilePath ShellDevToolsDelegate::GetDebugFrontendDir() { + return FilePath(); } std::string ShellDevToolsDelegate::GetPageThumbnailData(const GURL& url) { |