[DevTools] Switch frontend to flatten protocol
Introducing SessionRouter - a common router on top of raw connection
which routes messages between multiple sessions based on sessionId.
A couple of cleanups along the way.
Bug: 775132
Change-Id: I3f773f7ead4d1729d9b936c69b4cdda2d6d20996
Reviewed-on: https://chromium-review.googlesource.com/c/1321854
Commit-Queue: Dmitry Gozman <[email protected]>
Reviewed-by: Alexei Filippov <[email protected]>
Reviewed-by: Pavel Feldman <[email protected]>
Cr-Original-Commit-Position: refs/heads/master@{#607286}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ea8b4707ffc2000756fd8bc2537c9994a9c2901f
diff --git a/front_end/main/Main.js b/front_end/main/Main.js
index 0eb31b1..297b32b 100644
--- a/front_end/main/Main.js
+++ b/front_end/main/Main.js
@@ -615,7 +615,7 @@
*/
Main.sendOverProtocol = function(method, params) {
return new Promise((resolve, reject) => {
- Protocol.InspectorBackend.sendRawMessageForTesting(method, params, (err, ...results) => {
+ Protocol.test.sendRawMessage(method, params, (err, ...results) => {
if (err)
return reject(err);
return resolve(results);