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

Side by Side Diff: headless/public/internal/message_dispatcher.h

Issue 1907533002: headless: Implement DevTools events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add parameters to all events 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 unified diff | Download patch
« no previous file with comments | « headless/lib/headless_devtools_client_browsertest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef HEADLESS_PUBLIC_INTERNAL_MESSAGE_DISPATCHER_H_ 5 #ifndef HEADLESS_PUBLIC_INTERNAL_MESSAGE_DISPATCHER_H_
6 #define HEADLESS_PUBLIC_INTERNAL_MESSAGE_DISPATCHER_H_ 6 #define HEADLESS_PUBLIC_INTERNAL_MESSAGE_DISPATCHER_H_
7 7
8 namespace headless { 8 namespace headless {
9 namespace internal { 9 namespace internal {
10 10
11 // An internal interface for sending DevTools messages from the domain agents. 11 // An internal interface for sending DevTools messages from the domain agents.
12 class MessageDispatcher { 12 class MessageDispatcher {
13 public: 13 public:
14 virtual void SendMessage( 14 virtual void SendMessage(
15 const char* method, 15 const char* method,
16 std::unique_ptr<base::Value> params, 16 std::unique_ptr<base::Value> params,
17 base::Callback<void(const base::Value&)> callback) = 0; 17 base::Callback<void(const base::Value&)> callback) = 0;
18 virtual void SendMessage(const char* method, 18 virtual void SendMessage(const char* method,
19 std::unique_ptr<base::Value> params, 19 std::unique_ptr<base::Value> params,
20 base::Callback<void()> callback) = 0; 20 base::Callback<void()> callback) = 0;
21 virtual void SendMessage( 21 virtual void SendMessage(
22 const char* method, 22 const char* method,
23 base::Callback<void(const base::Value&)> callback) = 0; 23 base::Callback<void(const base::Value&)> callback) = 0;
24 virtual void SendMessage(const char* method, 24 virtual void SendMessage(const char* method,
25 base::Callback<void()> callback) = 0; 25 base::Callback<void()> callback) = 0;
26
27 virtual void RegisterEventHandler(
28 const char* method,
29 base::Callback<void(const base::Value&)> callback) = 0;
26 }; 30 };
27 31
28 } // namespace internal 32 } // namespace internal
29 } // namespace headless 33 } // namespace headless
30 34
31 #endif // HEADLESS_PUBLIC_INTERNAL_MESSAGE_DISPATCHER_H_ 35 #endif // HEADLESS_PUBLIC_INTERNAL_MESSAGE_DISPATCHER_H_
OLDNEW
« no previous file with comments | « headless/lib/headless_devtools_client_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698