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

Unified Diff: headless/public/headless_devtools_client.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_client.h
diff --git a/headless/public/headless_devtools_client.h b/headless/public/headless_devtools_client.h
new file mode 100644
index 0000000000000000000000000000000000000000..a71ce6572004b62946e535bfe64864cfd11614d4
--- /dev/null
+++ b/headless/public/headless_devtools_client.h
@@ -0,0 +1,157 @@
+// 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_CLIENT_H_
+#define HEADLESS_PUBLIC_HEADLESS_DEVTOOLS_CLIENT_H_
+
+#include <memory>
+
+#include "base/macros.h"
+#include "headless/public/headless_export.h"
+
+namespace headless {
+
+namespace accessibility {
+class Domain;
+}
+namespace animation {
+class Domain;
+}
+namespace application_cache {
+class Domain;
+}
+namespace cache_storage {
+class Domain;
+}
+namespace console {
+class Domain;
+}
+namespace css {
+class Domain;
+}
+namespace database {
+class Domain;
+}
+namespace debugger {
+class Domain;
+}
+namespace device_orientation {
+class Domain;
+}
+namespace dom {
+class Domain;
+}
+namespace dom_debugger {
+class Domain;
+}
+namespace dom_storage {
+class Domain;
+}
+namespace emulation {
+class Domain;
+}
+namespace heap_profiler {
+class Domain;
+}
+namespace indexeddb {
+class Domain;
+}
+namespace input {
+class Domain;
+}
+namespace inspector {
+class Domain;
+}
+namespace io {
+class Domain;
+}
+namespace layer_tree {
+class Domain;
+}
+namespace memory {
+class Domain;
+}
+namespace network {
+class Domain;
+}
+namespace page {
+class Domain;
+}
+namespace profiler {
+class Domain;
+}
+namespace rendering {
+class Domain;
+}
+namespace runtime {
+class Domain;
+}
+namespace security {
+class Domain;
+}
+namespace service_worker {
+class Domain;
+}
+namespace tracing {
+class Domain;
+}
+namespace worker {
+class Domain;
+}
+
+// An interface for controlling and receiving events from a devtools target.
+class HEADLESS_EXPORT HeadlessDevToolsClient {
+ public:
+ virtual ~HeadlessDevToolsClient() {}
+
+ static std::unique_ptr<HeadlessDevToolsClient> Create();
+
+ // DevTools commands are split into domains which corresponds to the getters
+ // below. Each domain can be used to send commands and to subscribe to events.
+ //
+ // See http://chromedevtools.github.io/debugger-protocol-viewer/ for
+ // the capabilities of each domain.
+ virtual accessibility::Domain* GetAccessibility() = 0;
+ virtual animation::Domain* GetAnimation() = 0;
+ virtual application_cache::Domain* GetApplicationCache() = 0;
+ virtual cache_storage::Domain* GetCacheStorage() = 0;
+ virtual console::Domain* GetConsole() = 0;
+ virtual css::Domain* GetCSS() = 0;
+ virtual database::Domain* GetDatabase() = 0;
+ virtual debugger::Domain* GetDebugger() = 0;
+ virtual device_orientation::Domain* GetDeviceOrientation() = 0;
+ virtual dom::Domain* GetDOM() = 0;
+ virtual dom_debugger::Domain* GetDOMDebugger() = 0;
+ virtual dom_storage::Domain* GetDOMStorage() = 0;
+ virtual emulation::Domain* GetEmulation() = 0;
+ virtual heap_profiler::Domain* GetHeapProfiler() = 0;
+ virtual indexeddb::Domain* GetIndexedDB() = 0;
+ virtual input::Domain* GetInput() = 0;
+ virtual inspector::Domain* GetInspector() = 0;
+ virtual io::Domain* GetIO() = 0;
+ virtual layer_tree::Domain* GetLayerTree() = 0;
+ virtual memory::Domain* GetMemory() = 0;
+ virtual network::Domain* GetNetwork() = 0;
+ virtual page::Domain* GetPage() = 0;
+ virtual profiler::Domain* GetProfiler() = 0;
+ virtual rendering::Domain* GetRendering() = 0;
+ virtual runtime::Domain* GetRuntime() = 0;
+ virtual security::Domain* GetSecurity() = 0;
+ virtual service_worker::Domain* GetServiceWorker() = 0;
+ virtual tracing::Domain* GetTracing() = 0;
+ virtual worker::Domain* GetWorker() = 0;
+
+ // TODO(skyostil): Add notification for disconnection.
+
+ private:
+ friend class HeadlessDevToolsClientImpl;
+
+ HeadlessDevToolsClient() {}
+
+ DISALLOW_COPY_AND_ASSIGN(HeadlessDevToolsClient);
+};
+
+} // namespace headless
+
+#endif // HEADLESS_PUBLIC_HEADLESS_DEVTOOLS_CLIENT_H_

Powered by Google App Engine
This is Rietveld 408576698