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

Unified Diff: content/shell/shell_devtools_delegate_android.cc

Issue 10832112: Simplify devtools code on android and enable devtools for android content_shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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_android.cc
diff --git a/content/shell/shell_devtools_delegate.cc b/content/shell/shell_devtools_delegate_android.cc
similarity index 62%
copy from content/shell/shell_devtools_delegate.cc
copy to content/shell/shell_devtools_delegate_android.cc
index 58427da8307c7e1a993fccec765262102df2c986..c62864ea9c19eb7f151baa97cd81855ba86711f1 100644
--- a/content/shell/shell_devtools_delegate.cc
+++ b/content/shell/shell_devtools_delegate_android.cc
@@ -4,15 +4,26 @@
#include "content/shell/shell_devtools_delegate.h"
-#include <algorithm>
-
+#include "base/stringprintf.h"
#include "content/public/browser/devtools_http_handler.h"
#include "grit/shell_resources.h"
-#include "net/base/tcp_listen_socket.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"
+namespace {
+
+// TODO(mnaganov): This hardcoded version should be replaced with the webkit
+// revision of this build of content shell. This requires a feature addition
+// to the devtools frontend.
+const char* kFrontendVersion = "21.0.1175.0";
pfeldman 2012/08/02 17:05:50 I don't see how this requires an additional featur
mnaganov (inactive) 2012/08/02 17:09:57 I remember we have discussed this and have agreed
pfeldman 2012/08/02 17:37:53 Sounds good.
+const char kSocketName[] = "content_shell_devtools_remote";
+const char kFrontEndURL[] =
+ "http://chrome-devtools-frontend.appspot.com/static/%s/devtools.html";
+
+}
+
namespace content {
ShellDevToolsDelegate::ShellDevToolsDelegate(
@@ -20,9 +31,11 @@ ShellDevToolsDelegate::ShellDevToolsDelegate(
net::URLRequestContextGetter* context_getter)
: context_getter_(context_getter) {
devtools_http_handler_ = DevToolsHttpHandler::Start(
- new net::TCPListenSocketFactory("127.0.0.1", port),
- "",
- context_getter_,
+ new net::UnixDomainSocketWithAbstractNamespaceFactory(
+ kSocketName,
+ base::Bind(&DevToolsHttpHandler::IsUserAllowedToConnect)),
pfeldman 2012/08/02 17:05:50 Could you define IsUserAllowedToConnect locally?
Satish 2012/08/02 17:17:53 I could, but it is also used by chrome/browser/and
+ StringPrintf(kFrontEndURL, kFrontendVersion),
+ context_getter,
this);
}
@@ -41,7 +54,7 @@ std::string ShellDevToolsDelegate::GetDiscoveryPageHTML() {
}
bool ShellDevToolsDelegate::BundlesFrontendResources() {
- return true;
+ return false;
}
std::string ShellDevToolsDelegate::GetFrontendResourcesBaseURL() {
« content/shell/shell_browser_main_parts.cc ('K') | « content/shell/shell_browser_main_parts.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698