Migrate protocol/ to ESM

- InspectorBackendCommands is now loaded via ES Modules

Bug: 1006759
Change-Id: I2826518a55e1f4fd7704cfb04120885f9aa9b604
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1837772
Reviewed-by: Yang Guo <[email protected]>
Reviewed-by: Benedikt Meurer <[email protected]>
Commit-Queue: Tim Van der Lippe <[email protected]>
Cr-Original-Commit-Position: refs/heads/master@{#702821}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 01369246df2350c6be2b0118d69313a7f56486bb
diff --git a/front_end/protocol/NodeURL.js b/front_end/protocol/NodeURL.js
index 6e00a79..d64cfc4 100644
--- a/front_end/protocol/NodeURL.js
+++ b/front_end/protocol/NodeURL.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-Protocol.NodeURL = class {
+export default class NodeURL {
   /**
    * @param {!Object} object
    */
@@ -14,7 +14,7 @@
      * @param {string} path
      */
     function process(object, path) {
-      if (object.url && Protocol.NodeURL._isPlatformPath(object.url, Host.isWin())) {
+      if (object.url && NodeURL._isPlatformPath(object.url, Host.isWin())) {
         object.url = Common.ParsedURL.platformPathToURL(object.url);
       }
       for (const entry of Object.entries(object)) {
@@ -41,4 +41,13 @@
       return fileSystemPath.length ? fileSystemPath[0] === '/' : false;
     }
   }
-};
+}
+
+/* Legacy exported object */
+self.Protocol = self.Protocol || {};
+
+/* Legacy exported object */
+Protocol = Protocol || {};
+
+/** @constructor */
+Protocol.NodeURL = NodeURL;