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

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

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 | « content/browser/devtools/devtools_protocol.h ('k') | content/browser/devtools/devtools_tracing_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « content/browser/devtools/devtools_protocol.h ('k') | content/browser/devtools/devtools_tracing_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698