OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.Event
s.FileSystemAdded, this._onFileSystemAdded, this); | 47 InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.Event
s.FileSystemAdded, this._onFileSystemAdded, this); |
48 InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.Event
s.FileSystemFilesChanged, this._onFileSystemFilesChanged, this); | 48 InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.Event
s.FileSystemFilesChanged, this._onFileSystemFilesChanged, this); |
49 InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.Event
s.IndexingTotalWorkCalculated, this._onIndexingTotalWorkCalculated, this); | 49 InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.Event
s.IndexingTotalWorkCalculated, this._onIndexingTotalWorkCalculated, this); |
50 InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.Event
s.IndexingWorked, this._onIndexingWorked, this); | 50 InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.Event
s.IndexingWorked, this._onIndexingWorked, this); |
51 InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.Event
s.IndexingDone, this._onIndexingDone, this); | 51 InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.Event
s.IndexingDone, this._onIndexingDone, this); |
52 InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.Event
s.SearchCompleted, this._onSearchCompleted, this); | 52 InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.Event
s.SearchCompleted, this._onSearchCompleted, this); |
53 | 53 |
54 this._initExcludePatterSetting(); | 54 this._initExcludePatterSetting(); |
55 | 55 |
56 this._fileSystemsLoadedPromise = this._requestFileSystems(); | 56 this._fileSystemsLoadedPromise = this._requestFileSystems(); |
57 } | 57 }; |
58 | 58 |
59 /** @typedef {!{fileSystemName: string, rootURL: string, fileSystemPath: string}
} */ | 59 /** @typedef {!{fileSystemName: string, rootURL: string, fileSystemPath: string}
} */ |
60 WebInspector.IsolatedFileSystemManager.FileSystem; | 60 WebInspector.IsolatedFileSystemManager.FileSystem; |
61 | 61 |
62 /** @enum {symbol} */ | 62 /** @enum {symbol} */ |
63 WebInspector.IsolatedFileSystemManager.Events = { | 63 WebInspector.IsolatedFileSystemManager.Events = { |
64 FileSystemAdded: Symbol("FileSystemAdded"), | 64 FileSystemAdded: Symbol("FileSystemAdded"), |
65 FileSystemRemoved: Symbol("FileSystemRemoved"), | 65 FileSystemRemoved: Symbol("FileSystemRemoved"), |
66 FileSystemFilesChanged: Symbol("FileSystemFilesChanged"), | 66 FileSystemFilesChanged: Symbol("FileSystemFilesChanged"), |
67 ExcludedFolderAdded: Symbol("ExcludedFolderAdded"), | 67 ExcludedFolderAdded: Symbol("ExcludedFolderAdded"), |
68 ExcludedFolderRemoved: Symbol("ExcludedFolderRemoved") | 68 ExcludedFolderRemoved: Symbol("ExcludedFolderRemoved") |
69 } | 69 }; |
70 | 70 |
71 WebInspector.IsolatedFileSystemManager._lastRequestId = 0; | 71 WebInspector.IsolatedFileSystemManager._lastRequestId = 0; |
72 | 72 |
73 WebInspector.IsolatedFileSystemManager.prototype = { | 73 WebInspector.IsolatedFileSystemManager.prototype = { |
74 /** | 74 /** |
75 * @return {!Promise<!Array<!WebInspector.IsolatedFileSystem>>} | 75 * @return {!Promise<!Array<!WebInspector.IsolatedFileSystem>>} |
76 */ | 76 */ |
77 _requestFileSystems: function() | 77 _requestFileSystems: function() |
78 { | 78 { |
79 var fulfill; | 79 var fulfill; |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 var files = /** @type {!Array.<string>} */ (event.data["files"]); | 335 var files = /** @type {!Array.<string>} */ (event.data["files"]); |
336 | 336 |
337 var callback = this._callbacks.get(requestId); | 337 var callback = this._callbacks.get(requestId); |
338 if (!callback) | 338 if (!callback) |
339 return; | 339 return; |
340 callback.call(null, files); | 340 callback.call(null, files); |
341 this._callbacks.delete(requestId); | 341 this._callbacks.delete(requestId); |
342 }, | 342 }, |
343 | 343 |
344 __proto__: WebInspector.Object.prototype | 344 __proto__: WebInspector.Object.prototype |
345 } | 345 }; |
346 | 346 |
347 /** | 347 /** |
348 * @type {!WebInspector.IsolatedFileSystemManager} | 348 * @type {!WebInspector.IsolatedFileSystemManager} |
349 */ | 349 */ |
350 WebInspector.isolatedFileSystemManager; | 350 WebInspector.isolatedFileSystemManager; |
OLD | NEW |