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

Issue 7248076: DevTools: add initial support for shared workers debugging (Closed)

Created:
9 years, 5 months ago by yurys
Modified:
9 years, 5 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, arv (Not doing code reviews)
Visibility:
Public.

Description

DevTools: add initial support for shared workers debugging. WorkerDevToolsManager is a service that is used for managing DevTools connections to DevTools agents in shared workers. It operates on the IO thread. Each debugged shared worker instance has unique devtools id which is used for addressing workers when passing messages between WorkerDevToolsManager and DevToolsManager. WorkerDevToolsManager translates those ids into WorkerProcessHost and worker_routing_id and back. WorkerDevToolsMessageFilter passes worker messages to the WorkerDevToolsManager which in turn forwards them to DevToolsManager on the UI thread where they are dispatched to corresponding DevTools window. Messages from DevTools frontend go through the DevToolsManager which forwards them to WorkerDevToolsManager on the IO thread where they are sent by means of corresponding WorkerProcessHost to the corresponding WorkerDevToolsAgent. BUG=None TEST=None Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=92346

Patch Set 1 #

Patch Set 2 : Removed some debug printing #

Total comments: 4

Patch Set 3 : Rebaseline #

Patch Set 4 : Rebase #

Patch Set 5 : Removed changes in DevToolsManager #

Total comments: 2

Patch Set 6 : rebase #

Total comments: 14

Patch Set 7 : Comments addressed #

Total comments: 12

Patch Set 8 : Comments addressed #

Patch Set 9 : Refactored worker_devtools_agent.cc #

Total comments: 1

Patch Set 10 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+564 lines, -51 lines) Patch
M chrome/browser/ui/webui/workers_ui.cc View 1 2 3 4 5 6 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/chrome.gyp View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/debugger/devtools_handler.cc View 1 2 3 4 5 6 2 chunks +4 lines, -0 lines 0 comments Download
M content/browser/debugger/devtools_window.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/debugger/devtools_window.cc View 1 2 3 4 5 6 7 8 9 2 chunks +12 lines, -4 lines 0 comments Download
A content/browser/debugger/worker_devtools_manager_io.h View 1 2 3 4 5 6 1 chunk +57 lines, -0 lines 0 comments Download
A content/browser/debugger/worker_devtools_manager_io.cc View 1 2 3 4 5 6 7 1 chunk +306 lines, -0 lines 0 comments Download
A content/browser/debugger/worker_devtools_message_filter.h View 1 chunk +31 lines, -0 lines 0 comments Download
A content/browser/debugger/worker_devtools_message_filter.cc View 1 2 3 4 5 6 1 chunk +42 lines, -0 lines 0 comments Download
M content/browser/worker_host/worker_process_host.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M content/common/devtools_messages.h View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -2 lines 0 comments Download
M content/renderer/worker_devtools_agent_proxy.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -2 lines 0 comments Download
M content/worker/websharedworker_stub.h View 2 chunks +3 lines, -0 lines 0 comments Download
M content/worker/websharedworker_stub.cc View 3 chunks +9 lines, -1 line 0 comments Download
M content/worker/webworker_stub.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/worker/worker_devtools_agent.h View 1 chunk +14 lines, -12 lines 0 comments Download
M content/worker/worker_devtools_agent.cc View 1 2 3 4 5 6 7 8 9 1 chunk +74 lines, -27 lines 0 comments Download

Messages

Total messages: 27 (0 generated)
yurys
Dmitry, please take a look at the changes in websharedworker_stub.cc and worker_process_host.cc. I tried to ...
9 years, 5 months ago (2011-07-05 17:00:48 UTC) #1
Jói
http://codereview.chromium.org/7248076/diff/18/content/browser/debugger/devtools_manager.cc File content/browser/debugger/devtools_manager.cc (right): http://codereview.chromium.org/7248076/diff/18/content/browser/debugger/devtools_manager.cc#newcode15 content/browser/debugger/devtools_manager.cc:15: #include "chrome/browser/profiles/profile_manager.h" Please don't add a new dependency on ...
9 years, 5 months ago (2011-07-05 18:00:45 UTC) #2
pfeldman
http://codereview.chromium.org/7248076/diff/18/content/browser/debugger/devtools_manager.cc File content/browser/debugger/devtools_manager.cc (right): http://codereview.chromium.org/7248076/diff/18/content/browser/debugger/devtools_manager.cc#newcode15 content/browser/debugger/devtools_manager.cc:15: #include "chrome/browser/profiles/profile_manager.h" On 2011/07/05 18:00:45, Jói wrote: > Please ...
9 years, 5 months ago (2011-07-06 08:29:39 UTC) #3
jam
http://codereview.chromium.org/7248076/diff/18/content/browser/debugger/devtools_manager.cc File content/browser/debugger/devtools_manager.cc (right): http://codereview.chromium.org/7248076/diff/18/content/browser/debugger/devtools_manager.cc#newcode15 content/browser/debugger/devtools_manager.cc:15: #include "chrome/browser/profiles/profile_manager.h" if a method is added to ContentBrowserClient ...
9 years, 5 months ago (2011-07-06 13:47:40 UTC) #4
jam
to explain: adding a temp method to get the default profile to CBC might lead ...
9 years, 5 months ago (2011-07-06 13:55:07 UTC) #5
yurys
http://codereview.chromium.org/7248076/diff/18/content/browser/debugger/devtools_manager.cc File content/browser/debugger/devtools_manager.cc (right): http://codereview.chromium.org/7248076/diff/18/content/browser/debugger/devtools_manager.cc#newcode15 content/browser/debugger/devtools_manager.cc:15: #include "chrome/browser/profiles/profile_manager.h" On 2011/07/06 13:47:40, John Abd-El-Malek wrote: > ...
9 years, 5 months ago (2011-07-06 14:03:52 UTC) #6
jam
On 2011/07/06 14:03:52, Yury Semikhatsky wrote: > http://codereview.chromium.org/7248076/diff/18/content/browser/debugger/devtools_manager.cc > File content/browser/debugger/devtools_manager.cc (right): > > http://codereview.chromium.org/7248076/diff/18/content/browser/debugger/devtools_manager.cc#newcode15 ...
9 years, 5 months ago (2011-07-06 14:53:07 UTC) #7
pfeldman
Should we move debugger back to chrome altogether and agree on what parts get moved ...
9 years, 5 months ago (2011-07-06 15:01:19 UTC) #8
Jói
When John and I walked through the debugger code it didn't look particularly impossible to ...
9 years, 5 months ago (2011-07-06 15:34:56 UTC) #9
jam
Joi is taking on the task of removing chrome dependencies from content. I commented because ...
9 years, 5 months ago (2011-07-06 15:36:36 UTC) #10
jam
+1 to everything with one caveat: we want to have as much code as possible ...
9 years, 5 months ago (2011-07-06 16:02:33 UTC) #11
pfeldman
I am fine with some pain. I also appreciate you guys stepping up and doing ...
9 years, 5 months ago (2011-07-06 16:07:44 UTC) #12
Jói
I think there may be some misunderstanding about the goal here. The intent is to ...
9 years, 5 months ago (2011-07-06 16:23:52 UTC) #13
pfeldman
DevToolsWindow is highly coupled with the browser. It decides where to dock devtools window (into ...
9 years, 5 months ago (2011-07-06 16:47:36 UTC) #14
Jói
I'm glad we're having this conversation :) > DevToolsWindow is highly coupled with the browser. ...
9 years, 5 months ago (2011-07-06 16:59:21 UTC) #15
Dmitry Titov
On 2011/07/05 17:00:48, Yury Semikhatsky wrote: > Dmitry, please take a look at the changes ...
9 years, 5 months ago (2011-07-06 18:22:46 UTC) #16
yurys
On 2011/07/06 18:22:46, Dmitry Titov wrote: > On 2011/07/05 17:00:48, Yury Semikhatsky wrote: > > ...
9 years, 5 months ago (2011-07-07 06:40:20 UTC) #17
yurys
On 2011/07/06 16:59:21, Jói wrote: > I'm glad we're having this conversation :) > > ...
9 years, 5 months ago (2011-07-07 06:55:14 UTC) #18
Jói
> If we need some default devtools UI which would base on the content/ > ...
9 years, 5 months ago (2011-07-07 14:52:58 UTC) #19
pfeldman
http://codereview.chromium.org/7248076/diff/12001/content/browser/debugger/devtools_window.cc File content/browser/debugger/devtools_window.cc (right): http://codereview.chromium.org/7248076/diff/12001/content/browser/debugger/devtools_window.cc#newcode77 content/browser/debugger/devtools_window.cc:77: DevToolsWindow* DevToolsWindow::CreateDevToolsWindow(Profile* profile) { CreateDevToolsWindowForWorker http://codereview.chromium.org/7248076/diff/15001/content/browser/debugger/worker_devtools_manager.cc File content/browser/debugger/worker_devtools_manager.cc (right): ...
9 years, 5 months ago (2011-07-08 09:17:17 UTC) #20
yurys
http://codereview.chromium.org/7248076/diff/12001/content/browser/debugger/devtools_window.cc File content/browser/debugger/devtools_window.cc (right): http://codereview.chromium.org/7248076/diff/12001/content/browser/debugger/devtools_window.cc#newcode77 content/browser/debugger/devtools_window.cc:77: DevToolsWindow* DevToolsWindow::CreateDevToolsWindow(Profile* profile) { On 2011/07/08 09:17:17, pfeldman wrote: ...
9 years, 5 months ago (2011-07-08 15:35:53 UTC) #21
jam
http://codereview.chromium.org/7248076/diff/14003/content/worker/worker_devtools_agent.cc File content/worker/worker_devtools_agent.cc (right): http://codereview.chromium.org/7248076/diff/14003/content/worker/worker_devtools_agent.cc#newcode66 content/worker/worker_devtools_agent.cc:66: class SharedWorkerDevToolsAgent : public WorkerDevToolsAgent { It's unfortunate that ...
9 years, 5 months ago (2011-07-08 17:49:09 UTC) #22
pfeldman
Looks good with a couple of nits. Please send to content owners for review & ...
9 years, 5 months ago (2011-07-11 12:07:15 UTC) #23
yurys
http://codereview.chromium.org/7248076/diff/14003/content/browser/debugger/devtools_window.cc File content/browser/debugger/devtools_window.cc (right): http://codereview.chromium.org/7248076/diff/14003/content/browser/debugger/devtools_window.cc#newcode139 content/browser/debugger/devtools_window.cc:139: // There is now inspected_rvh in case of shared ...
9 years, 5 months ago (2011-07-11 15:13:11 UTC) #24
jam
http://codereview.chromium.org/7248076/diff/14003/content/worker/worker_devtools_agent.cc File content/worker/worker_devtools_agent.cc (right): http://codereview.chromium.org/7248076/diff/14003/content/worker/worker_devtools_agent.cc#newcode66 content/worker/worker_devtools_agent.cc:66: class SharedWorkerDevToolsAgent : public WorkerDevToolsAgent { On 2011/07/11 15:13:11, ...
9 years, 5 months ago (2011-07-11 16:53:37 UTC) #25
yurys
http://codereview.chromium.org/7248076/diff/14003/content/worker/worker_devtools_agent.cc File content/worker/worker_devtools_agent.cc (right): http://codereview.chromium.org/7248076/diff/14003/content/worker/worker_devtools_agent.cc#newcode66 content/worker/worker_devtools_agent.cc:66: class SharedWorkerDevToolsAgent : public WorkerDevToolsAgent { On 2011/07/11 16:53:37, ...
9 years, 5 months ago (2011-07-12 13:58:46 UTC) #26
jam
9 years, 5 months ago (2011-07-12 18:19:55 UTC) #27
lgtm

http://codereview.chromium.org/7248076/diff/22001/content/worker/worker_devto...
File content/worker/worker_devtools_agent.cc (right):

http://codereview.chromium.org/7248076/diff/22001/content/worker/worker_devto...
content/worker/worker_devtools_agent.cc:65: void
WorkerDevToolsAgentImpl<WebWorker>::SendDevToolsMessage(
nit: it might be easier to read if the constructor takes a boolean for
shared/dedicated, and uses that to send different messages..

Powered by Google App Engine
This is Rietveld 408576698