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

Unified Diff: chromecast/shell/browser/devtools/remote_debugging_server.cc

Issue 607973004: Chromecast: Android devtools needs remote frontend URL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/shell/browser/devtools/remote_debugging_server.cc
diff --git a/chromecast/shell/browser/devtools/remote_debugging_server.cc b/chromecast/shell/browser/devtools/remote_debugging_server.cc
index f34af1e5a81b96118d594857f82e64ce0a5dd183..57214f1847cc6ebdfe85e57da28835bc93a67ea0 100644
--- a/chromecast/shell/browser/devtools/remote_debugging_server.cc
+++ b/chromecast/shell/browser/devtools/remote_debugging_server.cc
@@ -29,6 +29,10 @@ namespace shell {
namespace {
+#if defined(OS_ANDROID)
+const char kFrontEndURL[] =
+ "http://chrome-devtools-frontend.appspot.com/serve_rev/%s/devtools.html";
+#endif // defined(OS_ANDROID)
const int kDefaultRemoteDebuggingPort = 9222;
#if defined(OS_ANDROID)
@@ -85,6 +89,14 @@ CreateSocketFactory(int port) {
#endif
}
+std::string GetFrontendUrl() {
+#if defined(OS_ANDROID)
+ return base::StringPrintf(kFrontEndURL, content::GetWebKitRevision().c_str());
+#else
+ return std::string();
+#endif // defined(OS_ANDROID)
+}
+
} // namespace
RemoteDebuggingServer::RemoteDebuggingServer()
@@ -132,7 +144,7 @@ void RemoteDebuggingServer::OnPortChanged() {
if (port_ > 0) {
devtools_http_handler_ = content::DevToolsHttpHandler::Start(
CreateSocketFactory(port_),
- std::string(),
+ GetFrontendUrl(),
dgozman 2014/09/30 13:14:46 Please, also change CastDevToolsDelegate::BundlesF
gunsch 2014/09/30 15:53:30 Done.
new CastDevToolsDelegate(),
base::FilePath());
LOG(INFO) << "Devtools started: port=" << port_;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698