Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 53 * @param {!Workspace.UISourceCode} uiSourceCode | 53 * @param {!Workspace.UISourceCode} uiSourceCode |
| 54 * @param {function(?string)} callback | 54 * @param {function(?string)} callback |
| 55 */ | 55 */ |
| 56 requestFileContent(uiSourceCode, callback) { | 56 requestFileContent(uiSourceCode, callback) { |
| 57 var contentProvider = this._contentProviders[uiSourceCode.url()]; | 57 var contentProvider = this._contentProviders[uiSourceCode.url()]; |
| 58 contentProvider.requestContent().then(callback); | 58 contentProvider.requestContent().then(callback); |
| 59 } | 59 } |
| 60 | 60 |
| 61 /** | 61 /** |
| 62 * @override | 62 * @override |
| 63 * @param {!Workspace.UISourceCode} uiSourceCode | |
| 64 * @return {!Promise<?string>} | |
| 65 */ | |
| 66 requestOriginalFileContent(uiSourceCode) { | |
|
pfeldman
2017/02/15 22:33:15
Still too much
| |
| 67 var contentProvider = this._contentProviders[uiSourceCode.url()]; | |
| 68 return contentProvider.requestContent(); | |
| 69 } | |
| 70 | |
| 71 /** | |
| 72 * @override | |
| 63 * @return {boolean} | 73 * @return {boolean} |
| 64 */ | 74 */ |
| 65 isServiceProject() { | 75 isServiceProject() { |
| 66 return this._isServiceProject; | 76 return this._isServiceProject; |
| 67 } | 77 } |
| 68 | 78 |
| 69 /** | 79 /** |
| 70 * @override | 80 * @override |
| 71 * @param {!Workspace.UISourceCode} uiSourceCode | 81 * @param {!Workspace.UISourceCode} uiSourceCode |
| 72 * @return {!Promise<?Workspace.UISourceCodeMetadata>} | 82 * @return {!Promise<?Workspace.UISourceCodeMetadata>} |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 313 this.workspace().addProject(this); | 323 this.workspace().addProject(this); |
| 314 } | 324 } |
| 315 | 325 |
| 316 dispose() { | 326 dispose() { |
| 317 this._contentProviders = {}; | 327 this._contentProviders = {}; |
| 318 this.removeProject(); | 328 this.removeProject(); |
| 319 } | 329 } |
| 320 }; | 330 }; |
| 321 | 331 |
| 322 Bindings.ContentProviderBasedProject._metadata = Symbol('ContentProviderBasedPro ject.Metadata'); | 332 Bindings.ContentProviderBasedProject._metadata = Symbol('ContentProviderBasedPro ject.Metadata'); |
| OLD | NEW |