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); |
}; |