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

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

Issue 2487293002: DevTools: introduce sync checkmarks icons in StylesSidebarPane. (Closed)
Patch Set: DevTools: introduce icons in linkifier. 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 * @unrestricted 5 * @unrestricted
6 */ 6 */
7 WebInspector.Persistence = class extends WebInspector.Object { 7 WebInspector.Persistence = class extends WebInspector.Object {
8 /** 8 /**
9 * @param {!WebInspector.Workspace} workspace 9 * @param {!WebInspector.Workspace} workspace
10 * @param {!WebInspector.BreakpointManager} breakpointManager 10 * @param {!WebInspector.BreakpointManager} breakpointManager
11 * @param {!WebInspector.FileSystemMapping} fileSystemMapping 11 * @param {!WebInspector.FileSystemMapping} fileSystemMapping
12 */ 12 */
13 constructor(workspace, breakpointManager, fileSystemMapping) { 13 constructor(workspace, breakpointManager, fileSystemMapping) {
14 super(); 14 super();
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 if (Runtime.experiments.isEnabled('persistence2')) 20 if (Runtime.experiments.isEnabled('persistence2')) {
21 var iconProvider = new WebInspector.PersistenceUtils.LinkDecorator(this);
dgozman 2016/11/10 01:01:43 linkDecorator
lushnikov 2016/11/10 01:13:45 Done.
22 WebInspector.Linkifier.setLinkDecorator(iconProvider);
21 this._mapping = 23 this._mapping =
22 new WebInspector.Automapping(workspace, this._onBindingCreated.bind(th is), this._onBindingRemoved.bind(this)); 24 new WebInspector.Automapping(workspace, this._onBindingCreated.bind(th is), this._onBindingRemoved.bind(this));
23 else 25 } else {
24 this._mapping = new WebInspector.DefaultMapping( 26 this._mapping = new WebInspector.DefaultMapping(
25 workspace, fileSystemMapping, this._onBindingCreated.bind(this), this. _onBindingRemoved.bind(this)); 27 workspace, fileSystemMapping, this._onBindingCreated.bind(this), this. _onBindingRemoved.bind(this));
28 }
26 } 29 }
27 30
28 /** 31 /**
29 * @param {!WebInspector.PersistenceBinding} binding 32 * @param {!WebInspector.PersistenceBinding} binding
30 */ 33 */
31 _onBindingCreated(binding) { 34 _onBindingCreated(binding) {
32 if (binding.network.isDirty()) { 35 if (binding.network.isDirty()) {
33 WebInspector.console.log(WebInspector.UIString( 36 WebInspector.console.log(WebInspector.UIString(
34 '%s can not be persisted to file system due to unsaved changes.', bind ing.network.name())); 37 '%s can not be persisted to file system due to unsaved changes.', bind ing.network.name()));
35 return; 38 return;
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 */ 252 */
250 constructor(network, fileSystem, exactMatch) { 253 constructor(network, fileSystem, exactMatch) {
251 this.network = network; 254 this.network = network;
252 this.fileSystem = fileSystem; 255 this.fileSystem = fileSystem;
253 this.exactMatch = exactMatch; 256 this.exactMatch = exactMatch;
254 } 257 }
255 }; 258 };
256 259
257 /** @type {!WebInspector.Persistence} */ 260 /** @type {!WebInspector.Persistence} */
258 WebInspector.persistence; 261 WebInspector.persistence;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698