| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @constructor | 6 * @constructor |
| 7 * @param {!WebInspector.TargetManager} targetManager | 7 * @param {!WebInspector.TargetManager} targetManager |
| 8 * @param {!WebInspector.Workspace} workspace | 8 * @param {!WebInspector.Workspace} workspace |
| 9 * @param {!WebInspector.FileSystemWorkspaceBinding} fileSystemWorkspaceBinding | 9 * @param {!WebInspector.FileSystemWorkspaceBinding} fileSystemWorkspaceBinding |
| 10 * @param {!WebInspector.FileSystemMapping} fileSystemMapping | 10 * @param {!WebInspector.FileSystemMapping} fileSystemMapping |
| 11 */ | 11 */ |
| 12 WebInspector.NetworkMapping = function(targetManager, workspace, fileSystemWorks
paceBinding, fileSystemMapping) | 12 WebInspector.NetworkMapping = function(targetManager, workspace, fileSystemWorks
paceBinding, fileSystemMapping) |
| 13 { | 13 { |
| 14 this._targetManager = targetManager; | 14 this._targetManager = targetManager; |
| 15 this._workspace = workspace; | 15 this._workspace = workspace; |
| 16 this._fileSystemWorkspaceBinding = fileSystemWorkspaceBinding; | 16 this._fileSystemWorkspaceBinding = fileSystemWorkspaceBinding; |
| 17 this._fileSystemMapping = fileSystemMapping; | 17 this._fileSystemMapping = fileSystemMapping; |
| 18 InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.Event
s.RevealSourceLine, this._revealSourceLine, this); | 18 InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.Event
s.RevealSourceLine, this._revealSourceLine, this); |
| 19 | 19 |
| 20 var fileSystemManager = fileSystemWorkspaceBinding.fileSystemManager(); | 20 var fileSystemManager = fileSystemWorkspaceBinding.fileSystemManager(); |
| 21 this._eventListeners = [ | 21 this._eventListeners = [ |
| 22 fileSystemManager.addEventListener(WebInspector.IsolatedFileSystemManage
r.Events.FileSystemAdded, this._fileSystemAdded, this), | 22 fileSystemManager.addEventListener(WebInspector.IsolatedFileSystemManage
r.Events.FileSystemAdded, this._fileSystemAdded, this), |
| 23 fileSystemManager.addEventListener(WebInspector.IsolatedFileSystemManage
r.Events.FileSystemRemoved, this._fileSystemRemoved, this), | 23 fileSystemManager.addEventListener(WebInspector.IsolatedFileSystemManage
r.Events.FileSystemRemoved, this._fileSystemRemoved, this), |
| 24 ]; | 24 ]; |
| 25 fileSystemManager.waitForFileSystems() | 25 fileSystemManager.waitForFileSystems() |
| 26 .then(this._fileSystemsLoaded.bind(this)); | 26 .then(this._fileSystemsLoaded.bind(this)); |
| 27 } | 27 }; |
| 28 | 28 |
| 29 WebInspector.NetworkMapping.prototype = { | 29 WebInspector.NetworkMapping.prototype = { |
| 30 /** | 30 /** |
| 31 * @param {!Array<!WebInspector.IsolatedFileSystem>} fileSystems | 31 * @param {!Array<!WebInspector.IsolatedFileSystem>} fileSystems |
| 32 */ | 32 */ |
| 33 _fileSystemsLoaded: function(fileSystems) | 33 _fileSystemsLoaded: function(fileSystems) |
| 34 { | 34 { |
| 35 for (var fileSystem of fileSystems) | 35 for (var fileSystem of fileSystems) |
| 36 this._addMappingsForFilesystem(fileSystem); | 36 this._addMappingsForFilesystem(fileSystem); |
| 37 }, | 37 }, |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 } | 186 } |
| 187 } | 187 } |
| 188 | 188 |
| 189 this._workspace.addEventListener(WebInspector.Workspace.Events.UISourceC
odeAdded, listener, this); | 189 this._workspace.addEventListener(WebInspector.Workspace.Events.UISourceC
odeAdded, listener, this); |
| 190 }, | 190 }, |
| 191 | 191 |
| 192 dispose: function() | 192 dispose: function() |
| 193 { | 193 { |
| 194 WebInspector.EventTarget.removeEventListeners(this._eventListeners); | 194 WebInspector.EventTarget.removeEventListeners(this._eventListeners); |
| 195 } | 195 } |
| 196 } | 196 }; |
| 197 | 197 |
| 198 /** | 198 /** |
| 199 * @type {!WebInspector.NetworkMapping} | 199 * @type {!WebInspector.NetworkMapping} |
| 200 */ | 200 */ |
| 201 WebInspector.networkMapping; | 201 WebInspector.networkMapping; |
| OLD | NEW |