Index: content/browser/devtools/devtools_protocol.cc |
diff --git a/content/browser/devtools/devtools_protocol.cc b/content/browser/devtools/devtools_protocol.cc |
index e3d531489d5ebf024dfe2bc4e621bbad8d14723e..c01f6f24ff60dcf61134a20128f2b221ecdcd3df 100644 |
--- a/content/browser/devtools/devtools_protocol.cc |
+++ b/content/browser/devtools/devtools_protocol.cc |
@@ -178,6 +178,15 @@ |
return (it->second).Run(command); |
} |
+void DevToolsProtocol::Handler::HandleNotification( |
+ scoped_refptr<DevToolsProtocol::Notification> notification) { |
+ NotificationHandlers::iterator it = |
+ notification_handlers_.find(notification->method()); |
+ if (it == notification_handlers_.end()) |
+ return; |
+ (it->second).Run(notification); |
+} |
+ |
void DevToolsProtocol::Handler::SetNotifier(const Notifier& notifier) { |
notifier_ = notifier; |
} |
@@ -189,6 +198,12 @@ |
const std::string& command, |
const CommandHandler& handler) { |
command_handlers_[command] = handler; |
+} |
+ |
+void DevToolsProtocol::Handler::RegisterNotificationHandler( |
+ const std::string& notification, |
+ const NotificationHandler& handler) { |
+ notification_handlers_[notification] = handler; |
} |
void DevToolsProtocol::Handler::SendNotification( |