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

Unified Diff: content/shell/shell_devtools_delegate.cc

Issue 17389005: [Android] Abandon bundling DevTools frontends for mobile apps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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
Index: content/shell/shell_devtools_delegate.cc
diff --git a/content/shell/shell_devtools_delegate.cc b/content/shell/shell_devtools_delegate.cc
index 2d7b15ef30b5c0c654e9a97e9f41738a434da5d3..54983c2ef2da442f33e743e1ffee7bb1e405893e 100644
--- a/content/shell/shell_devtools_delegate.cc
+++ b/content/shell/shell_devtools_delegate.cc
@@ -9,6 +9,7 @@
#include "base/bind.h"
#include "base/command_line.h"
#include "base/strings/string_number_conversions.h"
+#include "components/devtools_remote_frontend/devtools_remote_frontend_util.h"
#include "content/public/browser/devtools_http_handler.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/content_switches.h"
@@ -19,7 +20,7 @@
#include "ui/base/resource/resource_bundle.h"
#if defined(OS_ANDROID)
-#include "content/public/browser/android/devtools_auth.h"
+#include "components/devtools_remote_frontend/devtools_auth_android.h"
#include "net/socket/unix_domain_socket_posix.h"
#endif
@@ -28,13 +29,16 @@ namespace {
net::StreamListenSocketFactory* CreateSocketFactory() {
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
#if defined(OS_ANDROID)
- std::string socket_name = "content_shell_devtools_remote";
+ std::string socket_name =
+ devtools_remote_frontend::GetDevToolsServerSocketName("content_shell");
if (command_line.HasSwitch(switches::kRemoteDebuggingSocketName)) {
socket_name = command_line.GetSwitchValueASCII(
switches::kRemoteDebuggingSocketName);
}
return new net::UnixDomainSocketWithAbstractNamespaceFactory(
- socket_name, "", base::Bind(&content::CanUserConnectToDevTools));
+ socket_name,
+ "",
+ base::Bind(&devtools_remote_frontend::CanUserConnectToDevTools));
#else
// See if the user specified a port on the command line (useful for
// automation). If not, use an ephemeral port by specifying 0.
@@ -59,6 +63,8 @@ namespace content {
ShellDevToolsDelegate::ShellDevToolsDelegate(BrowserContext* browser_context)
: browser_context_(browser_context) {
+ // Note that Content Shell always used bundled DevTools frontend,
+ // even on Android, because the shell is used for running layout tests.
devtools_http_handler_ =
DevToolsHttpHandler::Start(CreateSocketFactory(), std::string(), this);
}

Powered by Google App Engine
This is Rietveld 408576698