OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef HEADLESS_PUBLIC_HEADLESS_DEVTOOLS_TARGET_H_ |
| 6 #define HEADLESS_PUBLIC_HEADLESS_DEVTOOLS_TARGET_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "headless/public/headless_export.h" |
| 10 |
| 11 namespace headless { |
| 12 class HeadlessDevToolsClient; |
| 13 |
| 14 // A target which can be controlled and inspected using DevTools. |
| 15 class HEADLESS_EXPORT HeadlessDevToolsTarget { |
| 16 public: |
| 17 HeadlessDevToolsTarget() {} |
| 18 virtual ~HeadlessDevToolsTarget() {} |
| 19 |
| 20 // Attach or detach a client to this target. A client must be attached in |
| 21 // order to send commands or receive notifications from the target. |
| 22 // |
| 23 // A single client may be attached to at most one target at a time. Note that |
| 24 // currently also only one client may be attached to a single target at a |
| 25 // time. |
| 26 // |
| 27 // |client| must outlive this target. |
| 28 virtual void AttachClient(HeadlessDevToolsClient* client) = 0; |
| 29 virtual void DetachClient(HeadlessDevToolsClient* client) = 0; |
| 30 |
| 31 private: |
| 32 DISALLOW_COPY_AND_ASSIGN(HeadlessDevToolsTarget); |
| 33 }; |
| 34 |
| 35 } // namespace headless |
| 36 |
| 37 #endif // HEADLESS_PUBLIC_HEADLESS_DEVTOOLS_TARGET_H_ |
OLD | NEW |