OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 /* eslint-disable indent */ | 4 /* eslint-disable indent */ |
5 (function(window) { | 5 (function(window) { |
6 | 6 |
7 // DevToolsAPI --------------------------------------------------------------- - | 7 // DevToolsAPI --------------------------------------------------------------- - |
8 | 8 |
9 /** | 9 /** |
10 * @unrestricted | 10 * @unrestricted |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
329 * @return {string} | 329 * @return {string} |
330 */ | 330 */ |
331 platform() { | 331 platform() { |
332 return DevToolsHost.platform(); | 332 return DevToolsHost.platform(); |
333 } | 333 } |
334 | 334 |
335 /** | 335 /** |
336 * @override | 336 * @override |
337 */ | 337 */ |
338 loadCompleted() { | 338 loadCompleted() { |
339 DevToolsAPI.sendMessageToEmbedder('loadCompleted', [], null); | 339 DevToolsAPI.sendMessageToEmbedder('loadCompleted', [], null); |
dgozman
2016/12/14 05:29:36
showPanel should be called here instead.
einbinder
2016/12/15 03:28:02
Done.
| |
340 } | 340 } |
341 | 341 |
342 /** | 342 /** |
343 * @override | 343 * @override |
344 */ | 344 */ |
345 bringToFront() { | 345 bringToFront() { |
346 DevToolsAPI.sendMessageToEmbedder('bringToFront', [], null); | 346 DevToolsAPI.sendMessageToEmbedder('bringToFront', [], null); |
347 } | 347 } |
348 | 348 |
349 /** | 349 /** |
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1201 // Support for legacy (<M49) frontends. | 1201 // Support for legacy (<M49) frontends. |
1202 Event.prototype.deepPath = undefined; | 1202 Event.prototype.deepPath = undefined; |
1203 | 1203 |
1204 // Support for legacy (<53) frontends. | 1204 // Support for legacy (<53) frontends. |
1205 window.FileError = /** @type {!function (new: FileError) : ?} */ ({ | 1205 window.FileError = /** @type {!function (new: FileError) : ?} */ ({ |
1206 NOT_FOUND_ERR: DOMException.NOT_FOUND_ERR, | 1206 NOT_FOUND_ERR: DOMException.NOT_FOUND_ERR, |
1207 ABORT_ERR: DOMException.ABORT_ERR, | 1207 ABORT_ERR: DOMException.ABORT_ERR, |
1208 INVALID_MODIFICATION_ERR: DOMException.INVALID_MODIFICATION_ERR, | 1208 INVALID_MODIFICATION_ERR: DOMException.INVALID_MODIFICATION_ERR, |
1209 NOT_READABLE_ERR: 0 // No matching DOMException, so code will be 0. | 1209 NOT_READABLE_ERR: 0 // No matching DOMException, so code will be 0. |
1210 }); | 1210 }); |
1211 | |
1212 // Support for legacy (<57) frontends. | |
1213 if (window.Runtime && window.Runtime.queryParam) { | |
1214 var panelToOpen = window.Runtime.queryParam('panel'); | |
1215 if (panelToOpen) | |
1216 window.DevToolsAPI.showPanel(panelToOpen); | |
1217 } | |
1211 } | 1218 } |
1212 | 1219 |
1213 function windowLoaded() { | 1220 function windowLoaded() { |
1214 window.removeEventListener('DOMContentLoaded', windowLoaded, false); | 1221 window.removeEventListener('DOMContentLoaded', windowLoaded, false); |
1215 installBackwardsCompatibility(); | 1222 installBackwardsCompatibility(); |
1216 } | 1223 } |
1217 | 1224 |
1218 if (window.document.head && | 1225 if (window.document.head && |
1219 (window.document.readyState === 'complete' || window.document.readyState = == 'interactive')) | 1226 (window.document.readyState === 'complete' || window.document.readyState = == 'interactive')) |
1220 installBackwardsCompatibility(); | 1227 installBackwardsCompatibility(); |
(...skipping 11 matching lines...) Expand all Loading... | |
1232 * @return {boolean} | 1239 * @return {boolean} |
1233 */ | 1240 */ |
1234 DOMTokenList.prototype.toggle = function(token, force) { | 1241 DOMTokenList.prototype.toggle = function(token, force) { |
1235 if (arguments.length === 1) | 1242 if (arguments.length === 1) |
1236 force = !this.contains(token); | 1243 force = !this.contains(token); |
1237 return this.__originalDOMTokenListToggle(token, !!force); | 1244 return this.__originalDOMTokenListToggle(token, !!force); |
1238 }; | 1245 }; |
1239 } | 1246 } |
1240 | 1247 |
1241 })(window); | 1248 })(window); |
OLD | NEW |