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

Unified Diff: content/browser/devtools/devtools_protocol.h

Issue 516963003: Revert of DevTools: use explicit IPC messages for enabling/disabling tracing instead of intercepting protocol… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
« no previous file with comments | « no previous file | content/browser/devtools/devtools_protocol.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/devtools/devtools_protocol.h
diff --git a/content/browser/devtools/devtools_protocol.h b/content/browser/devtools/devtools_protocol.h
index cbc075b37157db00260f4fdd8b309e4d4ae5a089..71c24ab0f0176386581911d6cfe920b385b71a64 100644
--- a/content/browser/devtools/devtools_protocol.h
+++ b/content/browser/devtools/devtools_protocol.h
@@ -127,12 +127,18 @@
public:
typedef base::Callback<scoped_refptr<DevToolsProtocol::Response>(
scoped_refptr<DevToolsProtocol::Command> command)> CommandHandler;
+ typedef base::Callback<void(
+ scoped_refptr<DevToolsProtocol::Notification> notification)>
+ NotificationHandler;
virtual ~Handler();
virtual scoped_refptr<DevToolsProtocol::Response> HandleCommand(
scoped_refptr<DevToolsProtocol::Command> command);
+ virtual void HandleNotification(
+ scoped_refptr<DevToolsProtocol::Notification> notification);
+
void SetNotifier(const Notifier& notifier);
protected:
@@ -140,6 +146,9 @@
void RegisterCommandHandler(const std::string& command,
const CommandHandler& handler);
+
+ void RegisterNotificationHandler(const std::string& notification,
+ const NotificationHandler& handler);
// Sends notification to the client. Takes ownership of |params|.
void SendNotification(const std::string& method,
@@ -153,9 +162,11 @@
private:
typedef std::map<std::string, CommandHandler> CommandHandlers;
+ typedef std::map<std::string, NotificationHandler> NotificationHandlers;
Notifier notifier_;
CommandHandlers command_handlers_;
+ NotificationHandlers notification_handlers_;
DISALLOW_COPY_AND_ASSIGN(Handler);
};
« no previous file with comments | « no previous file | content/browser/devtools/devtools_protocol.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698