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

Issue 8549022: Define DevTools content API (Closed)

Created:
9 years, 1 month ago by yurys
Modified:
9 years ago
Reviewers:
jam, pfeldman
CC:
chromium-reviews, cbentzel+watch_chromium.org, tburkard+watch_chromium.org, jam, Erik does not do reviews, yoshiki+watch_chromium.org, mihaip+watch_chromium.org, dpranke-watch+content_chromium.org, joi+watch-content_chromium.org, Aaron Boodman, dominich+watch_chromium.org, darin-cc_chromium.org, Paweł Hajdan Jr., pam+watch_chromium.org, mmenke
Visibility:
Public.

Description

Define DevTools content API The API consists of the following parts: * DevToolsManager routes messages between devtools agents and clients * DevToolsAgentHost provides an abstract interface to the debuggee, currently it is either RenderViewHost or Shared Worker. Client can obtain DevToolsAgentHost from DevToolsAgentHostRegistry. * DevToolsClientHost is an API that should be implemented by DevTools front-end. There is a default Chromium implementation living in chrome/ and a remote debugging server which also implements this interface. Clients can extend it in order to provide custom front-end. There is a default DevTools front-end implementation and content/ provides a way for creating corresponding DevToolsClientHost by means of DevToolsClientHost::CreateDevToolsFrontendHost. The embedder just needs to provide a concrete delegate. * This patch also removes DevToolsHost_ForwardToAgent and DevToolsHost_ForwardToClient IPC messages which were used to forward only one message. DevTools IPC messages are now hidden behind the devtools content API. BUG=104625 TEST=Existing tests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=112473

Patch Set 1 #

Total comments: 2

Patch Set 2 : Next step #

Patch Set 3 : moved IsDebuggerActive to public #

Patch Set 4 : DevToolsManager -> DevToolsManagerImpl, moved client to public #

Total comments: 6

Patch Set 5 : Comments addressed #

Total comments: 20

Patch Set 6 : Rebased and added some comments as advised #

Patch Set 7 : Rebase #

Patch Set 8 : Addressed comments #

Total comments: 6

Patch Set 9 : Addressed pfeldman's comments #

Total comments: 6

Patch Set 10 : jam's comments addressed #

Unified diffs Side-by-side diffs Delta from patch set Stats (+828 lines, -1195 lines) Patch
M chrome/browser/DEPS View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/automation/automation_provider.cc View 1 2 3 4 5 6 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/debugger/devtools_sanity_unittest.cc View 1 2 3 4 5 6 7 8 9 3 chunks +11 lines, -6 lines 0 comments Download
M chrome/browser/debugger/devtools_window.h View 1 2 3 4 5 6 7 9 chunks +16 lines, -10 lines 0 comments Download
M chrome/browser/debugger/devtools_window.cc View 1 2 3 4 5 6 7 8 14 chunks +35 lines, -39 lines 0 comments Download
M chrome/browser/extensions/extension_debugger_api.cc View 1 2 3 4 5 6 7 9 chunks +25 lines, -27 lines 0 comments Download
M chrome/browser/extensions/extension_devtools_bridge.h View 1 2 3 4 5 6 7 2 chunks +4 lines, -6 lines 0 comments Download
M chrome/browser/extensions/extension_devtools_bridge.cc View 1 2 3 4 5 6 7 5 chunks +21 lines, -30 lines 0 comments Download
M chrome/browser/extensions/extension_devtools_browsertests.cc View 1 2 3 4 5 6 7 6 chunks +20 lines, -13 lines 0 comments Download
M chrome/browser/extensions/extension_service.cc View 1 2 3 4 5 6 7 8 9 4 chunks +15 lines, -6 lines 0 comments Download
M chrome/browser/prerender/prerender_browsertest.cc View 1 2 3 4 5 6 7 4 chunks +13 lines, -8 lines 0 comments Download
M chrome/browser/prerender/prerender_manager.cc View 1 2 3 4 5 6 7 3 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/task_manager/task_manager_worker_resource_provider.cc View 1 2 3 4 5 6 7 8 9 3 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/ui/browser.cc View 1 2 3 4 5 6 7 8 9 4 chunks +4 lines, -6 lines 0 comments Download
M chrome/browser/ui/webui/devtools_ui.cc View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -4 lines 0 comments Download
M chrome/browser/ui/webui/workers_ui.cc View 1 2 3 4 5 6 7 8 9 3 chunks +4 lines, -2 lines 0 comments Download
M content/browser/debugger/devtools_agent_host.h View 1 2 3 4 5 6 7 8 3 chunks +10 lines, -4 lines 0 comments Download
M content/browser/debugger/devtools_agent_host.cc View 1 2 3 4 5 6 7 3 chunks +13 lines, -0 lines 0 comments Download
D content/browser/debugger/devtools_client_host.h View 1 2 3 4 5 6 1 chunk +0 lines, -69 lines 0 comments Download
D content/browser/debugger/devtools_client_host.cc View 1 2 3 4 5 6 1 chunk +0 lines, -24 lines 0 comments Download
A content/browser/debugger/devtools_frontend_host.h View 1 2 3 4 5 6 7 1 chunk +59 lines, -0 lines 0 comments Download
A content/browser/debugger/devtools_frontend_host.cc View 1 2 3 4 5 6 7 1 chunk +112 lines, -0 lines 0 comments Download
D content/browser/debugger/devtools_frontend_message_handler.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -49 lines 0 comments Download
D content/browser/debugger/devtools_frontend_message_handler.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -80 lines 0 comments Download
M content/browser/debugger/devtools_http_protocol_handler.h View 1 2 3 2 chunks +5 lines, -2 lines 0 comments Download
M content/browser/debugger/devtools_http_protocol_handler.cc View 1 2 3 4 5 6 7 9 chunks +21 lines, -28 lines 0 comments Download
D content/browser/debugger/devtools_manager.h View 1 2 3 4 5 1 chunk +0 lines, -136 lines 0 comments Download
D content/browser/debugger/devtools_manager.cc View 1 2 3 4 5 1 chunk +0 lines, -296 lines 0 comments Download
A + content/browser/debugger/devtools_manager_impl.h View 1 2 3 4 5 6 7 6 chunks +54 lines, -50 lines 0 comments Download
A + content/browser/debugger/devtools_manager_impl.cc View 1 2 3 4 5 6 7 15 chunks +66 lines, -67 lines 0 comments Download
M content/browser/debugger/devtools_manager_unittest.cc View 1 2 3 4 5 6 7 8 chunks +42 lines, -27 lines 0 comments Download
M content/browser/debugger/render_view_devtools_agent_host.h View 1 2 3 4 5 6 7 3 chunks +6 lines, -4 lines 0 comments Download
M content/browser/debugger/render_view_devtools_agent_host.cc View 1 2 3 4 5 6 7 7 chunks +26 lines, -9 lines 0 comments Download
M content/browser/debugger/worker_devtools_manager.h View 1 2 3 4 5 6 7 4 chunks +9 lines, -5 lines 0 comments Download
M content/browser/debugger/worker_devtools_manager.cc View 1 2 3 4 5 6 7 8 9 8 chunks +26 lines, -10 lines 0 comments Download
M content/browser/debugger/worker_devtools_message_filter.h View 1 2 3 4 5 6 7 3 chunks +5 lines, -1 line 0 comments Download
M content/browser/debugger/worker_devtools_message_filter.cc View 1 2 3 4 5 6 7 4 chunks +9 lines, -4 lines 0 comments Download
M content/browser/tab_contents/render_view_host_manager.cc View 1 2 3 4 5 6 2 chunks +4 lines, -6 lines 0 comments Download
M content/browser/tab_contents/tab_contents.cc View 1 2 3 4 5 6 7 8 9 5 chunks +14 lines, -11 lines 0 comments Download
M content/browser/worker_host/worker_process_host.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M content/common/devtools_messages.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -10 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 2 chunks +8 lines, -8 lines 0 comments Download
A content/public/browser/devtools_agent_host_registry.h View 1 2 3 4 5 6 7 1 chunk +39 lines, -0 lines 0 comments Download
A + content/public/browser/devtools_client_host.h View 1 2 3 4 5 6 7 8 9 3 chunks +20 lines, -30 lines 0 comments Download
A + content/public/browser/devtools_frontend_host_delegate.h View 1 2 3 4 5 6 7 8 9 2 chunks +18 lines, -12 lines 0 comments Download
D content/public/browser/devtools_frontend_window.h View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -22 lines 0 comments Download
D content/public/browser/devtools_frontend_window_delegate.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -50 lines 0 comments Download
A content/public/browser/devtools_manager.h View 1 2 3 4 5 6 7 1 chunk +79 lines, -0 lines 0 comments Download
M content/renderer/devtools_agent.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -4 lines 0 comments Download
M content/renderer/devtools_client.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -3 lines 0 comments Download
M content/renderer/devtools_client.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -6 lines 0 comments Download
M content/worker/shared_worker_devtools_agent.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -3 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
yurys
We still need to figure out what to do with content/common/devtools_messages.h If we don't want ...
9 years, 1 month ago (2011-11-21 14:13:26 UTC) #1
yurys
Note, that this patch includes changes from http://codereview.chromium.org/8609010/ and once the latter is landed this ...
9 years, 1 month ago (2011-11-21 14:15:46 UTC) #2
pfeldman
I am not a fan of the GetInstance implementation on the devtools manager. Otherwise, devtools ...
9 years, 1 month ago (2011-11-21 14:52:20 UTC) #3
yurys
http://codereview.chromium.org/8549022/diff/1/content/public/browser/devtools/devtools_agent_host_registry.h File content/public/browser/devtools/devtools_agent_host_registry.h (right): http://codereview.chromium.org/8549022/diff/1/content/public/browser/devtools/devtools_agent_host_registry.h#newcode19 content/public/browser/devtools/devtools_agent_host_registry.h:19: static DevToolsAgentHost* FindDevToolsAgentHost(RenderViewHost* rvh); On 2011/11/21 14:52:21, pfeldman wrote: ...
9 years, 1 month ago (2011-11-21 15:07:14 UTC) #4
jam
Thanks so much for working on this, it's really appreciated. Please add rules in chrome/browser/DEPS ...
9 years, 1 month ago (2011-11-21 21:16:04 UTC) #5
yurys
http://codereview.chromium.org/8549022/diff/9001/content/browser/debugger/devtools_manager_impl.cc File content/browser/debugger/devtools_manager_impl.cc (right): http://codereview.chromium.org/8549022/diff/9001/content/browser/debugger/devtools_manager_impl.cc#newcode26 content/browser/debugger/devtools_manager_impl.cc:26: using content::DevToolsAgentHostRegistry; On 2011/11/21 21:16:04, John Abd-El-Malek wrote: > ...
9 years ago (2011-11-30 15:49:43 UTC) #6
pfeldman
Although the change looks good to me, it is getting hard to review it. Could ...
9 years ago (2011-11-30 16:43:26 UTC) #7
yurys
http://codereview.chromium.org/8549022/diff/19001/chrome/browser/debugger/devtools_window.cc File chrome/browser/debugger/devtools_window.cc (right): http://codereview.chromium.org/8549022/diff/19001/chrome/browser/debugger/devtools_window.cc#newcode183 chrome/browser/debugger/devtools_window.cc:183: ALLOW_THIS_IN_INITIALIZER_LIST(frontend_host_( On 2011/11/30 16:43:26, pfeldman wrote: > You could ...
9 years ago (2011-11-30 17:08:28 UTC) #8
jam
lgtm with removing the cc file I was just waiting for the review comments to ...
9 years ago (2011-12-01 03:51:47 UTC) #9
yurys
9 years ago (2011-12-01 15:20:06 UTC) #10
http://codereview.chromium.org/8549022/diff/24001/content/public/browser/devt...
File content/public/browser/devtools_client_host.cc (right):

http://codereview.chromium.org/8549022/diff/24001/content/public/browser/devt...
content/public/browser/devtools_client_host.cc:1: // Copyright (c) 2011 The
Chromium Authors. All rights reserved.
On 2011/12/01 03:51:47, John Abd-El-Malek wrote:
> nit: remove this file

Done.

http://codereview.chromium.org/8549022/diff/24001/content/public/browser/devt...
File content/public/browser/devtools_client_host.h (right):

http://codereview.chromium.org/8549022/diff/24001/content/public/browser/devt...
content/public/browser/devtools_client_host.h:30: DevToolsClientHost();
On 2011/12/01 03:51:47, John Abd-El-Malek wrote:
> nit: we avoid constructors on interfaces

Done.

http://codereview.chromium.org/8549022/diff/24001/content/public/browser/devt...
content/public/browser/devtools_client_host.h:31: virtual ~DevToolsClientHost();
On 2011/12/01 03:51:47, John Abd-El-Malek wrote:
> nit: convention for the content API is to inline the virtual destructor, that
> way you don't need a .cc file for the interface

Done.

Powered by Google App Engine
This is Rietveld 408576698