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

Unified Diff: headless/public/headless_devtools_target.h

Issue 1805983002: headless: Implement client API generation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make PendingMessage moveable Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: headless/public/headless_devtools_target.h
diff --git a/headless/public/headless_devtools_target.h b/headless/public/headless_devtools_target.h
new file mode 100644
index 0000000000000000000000000000000000000000..941fe6f51e2ae640e9462d015f5c646005eebc5e
--- /dev/null
+++ b/headless/public/headless_devtools_target.h
@@ -0,0 +1,37 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef HEADLESS_PUBLIC_HEADLESS_DEVTOOLS_TARGET_H_
+#define HEADLESS_PUBLIC_HEADLESS_DEVTOOLS_TARGET_H_
+
+#include "base/macros.h"
+#include "headless/public/headless_export.h"
+
+namespace headless {
+class HeadlessDevToolsClient;
+
+// A target which can be controlled and inspected using DevTools.
+class HEADLESS_EXPORT HeadlessDevToolsTarget {
+ public:
+ HeadlessDevToolsTarget() {}
+ virtual ~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.
+ //
+ // |client| must outlive this target.
+ virtual void AttachClient(HeadlessDevToolsClient* client) = 0;
+ virtual void DetachClient(HeadlessDevToolsClient* client) = 0;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(HeadlessDevToolsTarget);
+};
+
+} // namespace headless
+
+#endif // HEADLESS_PUBLIC_HEADLESS_DEVTOOLS_TARGET_H_

Powered by Google App Engine
This is Rietveld 408576698