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

Unified Diff: chrome/browser/devtools/device/devtools_android_bridge.cc

Issue 496363003: DevTools: Make Frontend treat remote service workers as workers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 | chrome/browser/devtools/devtools_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/devtools/device/devtools_android_bridge.cc
diff --git a/chrome/browser/devtools/device/devtools_android_bridge.cc b/chrome/browser/devtools/device/devtools_android_bridge.cc
index e58a8572e8a499ce1d075ba2dec3f1b1fa08b46e..969413b9ad9b274662050e77ebdbfc3f788f3941 100644
--- a/chrome/browser/devtools/device/devtools_android_bridge.cc
+++ b/chrome/browser/devtools/device/devtools_android_bridge.cc
@@ -408,6 +408,7 @@ class RemotePageTarget : public DevToolsTargetImpl,
std::string debug_url_;
std::string frontend_url_;
std::string remote_id_;
+ std::string remote_type_;
DISALLOW_COPY_AND_ASSIGN(RemotePageTarget);
};
@@ -443,7 +444,8 @@ RemotePageTarget::RemotePageTarget(
browser, GetDebugURL(value))),
browser_(browser),
debug_url_(GetDebugURL(value)),
- remote_id_(GetStringProperty(value, "id")) {
+ remote_id_(GetStringProperty(value, "id")),
+ remote_type_(GetStringProperty(value, "type")) {
set_type("adb_page");
set_url(GURL(GetStringProperty(value, "url")));
set_title(base::UTF16ToUTF8(net::UnescapeForHTML(base::UTF8ToUTF16(
@@ -483,8 +485,9 @@ static void NoOp(int, const std::string&) {}
void RemotePageTarget::Inspect(Profile* profile) const {
Activate();
- DevToolsWindow::OpenExternalFrontend(profile, frontend_url_,
- GetAgentHost());
+ bool isWorker = remote_type_ == "worker" || remote_type_ == "service_worker";
dgozman 2014/08/22 16:33:03 Please use constants from devtools_target_impl.
vkuzkokov 2014/08/25 15:11:38 Done.
+ DevToolsWindow::OpenExternalFrontend(profile, frontend_url_, GetAgentHost(),
+ isWorker);
}
bool RemotePageTarget::Activate() const {
« no previous file with comments | « no previous file | chrome/browser/devtools/devtools_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698