Chromium Code Reviews| Index: headless/public/headless_devtools_target.h |
| diff --git a/headless/public/headless_devtools_target.h b/headless/public/headless_devtools_target.h |
| index 941fe6f51e2ae640e9462d015f5c646005eebc5e..f507271ebe1f98c74a830618759f611e82775296 100644 |
| --- a/headless/public/headless_devtools_target.h |
| +++ b/headless/public/headless_devtools_target.h |
| @@ -20,14 +20,21 @@ class HEADLESS_EXPORT HeadlessDevToolsTarget { |
| // Attach or detach a client to this target. A client must be attached in |
| // order to send commands or receive notifications from the target. |
| // |
| - // A single client may be attached to at most one target at a time. Note that |
| - // currently also only one client may be attached to a single target at a |
| - // time. |
| + // A single client may be attached to at most one target at a time. If |
| + // the target already has a client attached, AttachClient will return false. |
| + // ForceAttachClient will detach any existing connection before attaching |
| + // |client|. |
| + // Note that currently also only one client may be attached to a single target |
| + // at a time. |
| // |
| // |client| must outlive this target. |
| - virtual void AttachClient(HeadlessDevToolsClient* client) = 0; |
| + virtual bool AttachClient(HeadlessDevToolsClient* client) = 0; |
| + virtual void ForceAttachClient(HeadlessDevToolsClient* client) = 0; |
| virtual void DetachClient(HeadlessDevToolsClient* client) = 0; |
| + // Returns true if a devtools client is attaced. |
|
Sami
2016/11/28 16:58:13
typo: attached
tmarek
2016/11/29 10:14:59
Done.
|
| + virtual bool IsAttached() = 0; |
| + |
| private: |
| DISALLOW_COPY_AND_ASSIGN(HeadlessDevToolsTarget); |
| }; |