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

Unified Diff: headless/public/headless_devtools_client.h

Issue 2812253002: Headless: Support sending and receiving of raw protocol messages (Closed)
Patch Set: Created 3 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
index 573336af792ea6e3334851fbd1b648b85bf06476..4bf8380dd1695fb5d40fb4737704e3eaa972e9d1 100644
--- a/headless/public/headless_devtools_client.h
+++ b/headless/public/headless_devtools_client.h
@@ -146,6 +146,25 @@ class HEADLESS_EXPORT HeadlessDevToolsClient {
virtual target::Domain* GetTarget() = 0;
virtual tracing::Domain* GetTracing() = 0;
+ class HEADLESS_EXPORT RawProtocolListener {
+ public:
+ RawProtocolListener() {}
+ virtual ~RawProtocolListener() {}
+
+ virtual void OnProtocolMessage(
Sami 2017/04/12 14:54:24 This feels a little asymmetric since you send a st
alex clarke (OOO till 29th) 2017/04/13 10:46:28 As discussed offline we added void SendRawDevTools
+ const std::string& json_message,
+ const base::DictionaryValue* parsed_message) = 0;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(RawProtocolListener);
+ };
+
+ virtual void SetRawProtocolListener(
+ RawProtocolListener* raw_protocol_listener) = 0;
+
+ // The id within the |json_message| must be odd to prevent collisions.
+ virtual void SendRawDevtoolsMessage(const std::string& json_message) = 0;
Sami 2017/04/12 14:54:24 s/Devtools/DevTools/
alex clarke (OOO till 29th) 2017/04/13 10:46:28 Done.
+
// TODO(skyostil): Add notification for disconnection.
private:

Powered by Google App Engine
This is Rietveld 408576698