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

Issue 2456643002: Create a base agent class for ui_devtools (Closed)

Created:
4 years, 1 month ago by Sarmad Hashmi
Modified:
4 years, 1 month ago
Reviewers:
sadrul, dgozman
CC:
chromium-reviews, pfeldman, devtools-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Create a base agent class for ui_devtools Each ui component such as ash, must create its own agents that implement various backends (such as DOM or CSS). Each agent must be wired to the main dispatcher so that it can receive events. In addition, each agent must have access to a FrontendChannel instance so that it can push updates to the inspector. This change creates a base agent which abstracts out all of this. Any agent, like a DOM or CSS agent simply inherit from this class and whenever they are attached to the UiDevToolsClient, they are then initialized. This means they are wired up and the FrontendChannel instance is set with the dispatcher available from UiDevToolsClient. This is what DevTools does for their agents, and this CL implements a simpler version of that. BUG=648701 Committed: https://crrev.com/e2445fe73810b097225b9ed1caedafe0251a2120 Cr-Commit-Position: refs/heads/master@{#428615}

Patch Set 1 #

Patch Set 2 : Create a base agent class so that initialization of the backend/frontend is abstracted out #

Patch Set 3 : Add comments and fix header #

Total comments: 4

Patch Set 4 : sadruls comments #

Total comments: 4

Patch Set 5 : sadruls comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+62 lines, -2 lines) Patch
M components/ui_devtools/BUILD.gn View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
A components/ui_devtools/devtools_base_agent.h View 1 2 3 4 1 chunk +51 lines, -0 lines 0 comments Download
M components/ui_devtools/devtools_client.h View 3 chunks +5 lines, -1 line 0 comments Download
M components/ui_devtools/devtools_client.cc View 1 2 3 4 2 chunks +5 lines, -1 line 0 comments Download

Dependent Patchsets:

Messages

Total messages: 22 (13 generated)
Sarmad Hashmi
This CL will allow backends to be added and initialized in a more generic way ...
4 years, 1 month ago (2016-10-26 20:47:34 UTC) #2
sadrul
looks good to me. +dgozman@ for devtools owner review. https://codereview.chromium.org/2456643002/diff/40001/components/ui_devtools/devtools_base_agent.h File components/ui_devtools/devtools_base_agent.h (right): https://codereview.chromium.org/2456643002/diff/40001/components/ui_devtools/devtools_base_agent.h#newcode6 components/ui_devtools/devtools_base_agent.h:6: ...
4 years, 1 month ago (2016-10-28 02:06:16 UTC) #8
dgozman
lgtm
4 years, 1 month ago (2016-10-28 02:11:54 UTC) #9
Sarmad Hashmi
https://codereview.chromium.org/2456643002/diff/40001/components/ui_devtools/devtools_base_agent.h File components/ui_devtools/devtools_base_agent.h (right): https://codereview.chromium.org/2456643002/diff/40001/components/ui_devtools/devtools_base_agent.h#newcode6 components/ui_devtools/devtools_base_agent.h:6: #define COMPONENTS_UI_DEVTOOLS_DEVTOOLS_BASE_AGENT_H_ On 2016/10/28 02:06:16, sadrul wrote: > Add ...
4 years, 1 month ago (2016-10-28 18:52:01 UTC) #10
sadrul
lgtm with the nits addressed. https://codereview.chromium.org/2456643002/diff/60001/components/ui_devtools/devtools_base_agent.h File components/ui_devtools/devtools_base_agent.h (right): https://codereview.chromium.org/2456643002/diff/60001/components/ui_devtools/devtools_base_agent.h#newcode18 components/ui_devtools/devtools_base_agent.h:18: virtual void init(protocol::UberDispatcher*) = ...
4 years, 1 month ago (2016-10-29 05:49:15 UTC) #11
Sarmad Hashmi
https://codereview.chromium.org/2456643002/diff/60001/components/ui_devtools/devtools_base_agent.h File components/ui_devtools/devtools_base_agent.h (right): https://codereview.chromium.org/2456643002/diff/60001/components/ui_devtools/devtools_base_agent.h#newcode18 components/ui_devtools/devtools_base_agent.h:18: virtual void init(protocol::UberDispatcher*) = 0; On 2016/10/29 05:49:15, sadrul ...
4 years, 1 month ago (2016-10-29 16:11:09 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2456643002/80001
4 years, 1 month ago (2016-10-29 20:41:13 UTC) #19
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 1 month ago (2016-10-29 20:47:38 UTC) #20
commit-bot: I haz the power
4 years, 1 month ago (2016-10-29 20:50:56 UTC) #22
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/e2445fe73810b097225b9ed1caedafe0251a2120
Cr-Commit-Position: refs/heads/master@{#428615}

Powered by Google App Engine
This is Rietveld 408576698