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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/persistence/Persistence.js

Issue 2418813005: DevTools: [Persistence] implement automapping (Closed)
Patch Set: update UI Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 * @extends {WebInspector.Object} 7 * @extends {WebInspector.Object}
8 * @param {!WebInspector.Workspace} workspace 8 * @param {!WebInspector.Workspace} workspace
9 * @param {!WebInspector.BreakpointManager} breakpointManager 9 * @param {!WebInspector.BreakpointManager} breakpointManager
10 * @param {!WebInspector.FileSystemMapping} fileSystemMapping 10 * @param {!WebInspector.FileSystemMapping} fileSystemMapping
11 */ 11 */
12 WebInspector.Persistence = function(workspace, breakpointManager, fileSystemMapp ing) 12 WebInspector.Persistence = function(workspace, breakpointManager, fileSystemMapp ing)
13 { 13 {
14 WebInspector.Object.call(this); 14 WebInspector.Object.call(this);
15 this._workspace = workspace; 15 this._workspace = workspace;
16 this._breakpointManager = breakpointManager; 16 this._breakpointManager = breakpointManager;
17 /** @type {!Map<string, number>} */ 17 /** @type {!Map<string, number>} */
18 this._filePathPrefixesToBindingCount = new Map(); 18 this._filePathPrefixesToBindingCount = new Map();
19 19
20 this._mapping = new WebInspector.DefaultMapping(workspace, fileSystemMapping , this._onBindingCreated.bind(this), this._onBindingRemoved.bind(this)); 20 if (Runtime.experiments.isEnabled("persistence2"))
21 }; 21 this._mapping = new WebInspector.Automapping(workspace, this._onBindingC reated.bind(this), this._onBindingRemoved.bind(this));
dgozman 2016/10/25 01:51:48 Let's wait for all file systems to load before cre
lushnikov 2016/10/25 03:32:41 We already wait for them in the FileSystemWorkspac
22 else
23 this._mapping = new WebInspector.DefaultMapping(workspace, fileSystemMap ping, this._onBindingCreated.bind(this), this._onBindingRemoved.bind(this));
24 }
22 25
23 WebInspector.Persistence._binding = Symbol("Persistence.Binding"); 26 WebInspector.Persistence._binding = Symbol("Persistence.Binding");
24 WebInspector.Persistence._muteCommit = Symbol("Persistence.MuteCommit"); 27 WebInspector.Persistence._muteCommit = Symbol("Persistence.MuteCommit");
25 28
26 WebInspector.Persistence._NodePrefix = "(function (exports, require, module, __f ilename, __dirname) { "; 29 WebInspector.Persistence._NodePrefix = "(function (exports, require, module, __f ilename, __dirname) { ";
27 WebInspector.Persistence._NodeSuffix = "\n});"; 30 WebInspector.Persistence._NodeSuffix = "\n});";
28 WebInspector.Persistence._NodeShebang = "#!/usr/bin/env node\n"; 31 WebInspector.Persistence._NodeShebang = "#!/usr/bin/env node\n";
29 32
30 WebInspector.Persistence.Events = { 33 WebInspector.Persistence.Events = {
31 BindingCreated: Symbol("BindingCreated"), 34 BindingCreated: Symbol("BindingCreated"),
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 this._mapping.dispose(); 230 this._mapping.dispose();
228 }, 231 },
229 232
230 __proto__: WebInspector.Object.prototype 233 __proto__: WebInspector.Object.prototype
231 }; 234 };
232 235
233 /** 236 /**
234 * @constructor 237 * @constructor
235 * @param {!WebInspector.UISourceCode} network 238 * @param {!WebInspector.UISourceCode} network
236 * @param {!WebInspector.UISourceCode} fileSystem 239 * @param {!WebInspector.UISourceCode} fileSystem
240 * @param {boolean} exactMatch
237 */ 241 */
238 WebInspector.PersistenceBinding = function(network, fileSystem) 242 WebInspector.PersistenceBinding = function(network, fileSystem, exactMatch)
239 { 243 {
240 this.network = network; 244 this.network = network;
241 this.fileSystem = fileSystem; 245 this.fileSystem = fileSystem;
246 this.exactMatch = exactMatch;
242 }; 247 };
243 248
244 /** @type {!WebInspector.Persistence} */ 249 /** @type {!WebInspector.Persistence} */
245 WebInspector.persistence; 250 WebInspector.persistence;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698