| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * | 10 * |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 /** | 50 /** |
| 51 * @param {!Common.Event} event | 51 * @param {!Common.Event} event |
| 52 */ | 52 */ |
| 53 _inspectedURLChanged(event) { | 53 _inspectedURLChanged(event) { |
| 54 var mainTarget = SDK.targetManager.mainTarget(); | 54 var mainTarget = SDK.targetManager.mainTarget(); |
| 55 if (event.data !== mainTarget) | 55 if (event.data !== mainTarget) |
| 56 return; | 56 return; |
| 57 var inspectedURL = mainTarget && mainTarget.inspectedURL(); | 57 var inspectedURL = mainTarget && mainTarget.inspectedURL(); |
| 58 if (!inspectedURL) | 58 if (!inspectedURL) |
| 59 return; | 59 return; |
| 60 for (var node of this._uiSourceCodeNodes.valuesArray()) { | 60 for (var node of this.uiSourceCodeNodes()) { |
| 61 var uiSourceCode = node.uiSourceCode(); | 61 var uiSourceCode = node.uiSourceCode(); |
| 62 if (uiSourceCode.url() === inspectedURL) | 62 if (uiSourceCode.url() === inspectedURL) |
| 63 this.revealUISourceCode(uiSourceCode, true); | 63 this.revealUISourceCode(uiSourceCode, true); |
| 64 } | 64 } |
| 65 } | 65 } |
| 66 | 66 |
| 67 /** | 67 /** |
| 68 * @override | 68 * @override |
| 69 * @param {!Workspace.UISourceCode} uiSourceCode | 69 * @param {!Workspace.UISourceCode} uiSourceCode |
| 70 */ | 70 */ |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 /** | 109 /** |
| 110 * @param {!Common.Event} event | 110 * @param {!Common.Event} event |
| 111 */ | 111 */ |
| 112 _inspectedURLChanged(event) { | 112 _inspectedURLChanged(event) { |
| 113 var mainTarget = SDK.targetManager.mainTarget(); | 113 var mainTarget = SDK.targetManager.mainTarget(); |
| 114 if (event.data !== mainTarget) | 114 if (event.data !== mainTarget) |
| 115 return; | 115 return; |
| 116 var inspectedURL = mainTarget && mainTarget.inspectedURL(); | 116 var inspectedURL = mainTarget && mainTarget.inspectedURL(); |
| 117 if (!inspectedURL) | 117 if (!inspectedURL) |
| 118 return; | 118 return; |
| 119 for (var node of this._uiSourceCodeNodes.valuesArray()) { | 119 for (var node of this.uiSourceCodeNodes()) { |
| 120 var uiSourceCode = node.uiSourceCode(); | 120 var uiSourceCode = node.uiSourceCode(); |
| 121 if (uiSourceCode.url() === inspectedURL) | 121 if (uiSourceCode.url() === inspectedURL) |
| 122 this.revealUISourceCode(uiSourceCode, true); | 122 this.revealUISourceCode(uiSourceCode, true); |
| 123 } | 123 } |
| 124 } | 124 } |
| 125 | 125 |
| 126 /** | 126 /** |
| 127 * @override | 127 * @override |
| 128 * @param {!Workspace.UISourceCode} uiSourceCode | 128 * @param {!Workspace.UISourceCode} uiSourceCode |
| 129 */ | 129 */ |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 this.create(Snippets.scriptSnippetModel.project(), ''); | 270 this.create(Snippets.scriptSnippetModel.project(), ''); |
| 271 } | 271 } |
| 272 | 272 |
| 273 /** | 273 /** |
| 274 * @override | 274 * @override |
| 275 */ | 275 */ |
| 276 sourceDeleted(uiSourceCode) { | 276 sourceDeleted(uiSourceCode) { |
| 277 this._handleRemoveSnippet(uiSourceCode); | 277 this._handleRemoveSnippet(uiSourceCode); |
| 278 } | 278 } |
| 279 }; | 279 }; |
| OLD | NEW |