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 | 4 |
5 (function(window) { | 5 (function(window) { |
6 | 6 |
7 // DevToolsAPI ---------------------------------------------------------------- | 7 // DevToolsAPI ---------------------------------------------------------------- |
8 | 8 |
9 /** | 9 /** |
10 * @constructor | 10 * @constructor |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 DevToolsAPI.sendMessageToEmbedder("setIsDocked", [isDocked], callback); | 393 DevToolsAPI.sendMessageToEmbedder("setIsDocked", [isDocked], callback); |
394 }, | 394 }, |
395 | 395 |
396 /** | 396 /** |
397 * Requests inspected page to be placed atop of the inspector frontend with
specified bounds. | 397 * Requests inspected page to be placed atop of the inspector frontend with
specified bounds. |
398 * @override | 398 * @override |
399 * @param {{x: number, y: number, width: number, height: number}} bounds | 399 * @param {{x: number, y: number, width: number, height: number}} bounds |
400 */ | 400 */ |
401 setInspectedPageBounds: function(bounds) | 401 setInspectedPageBounds: function(bounds) |
402 { | 402 { |
403 var converted = { | 403 DevToolsAPI.sendMessageToEmbedder("setInspectedPageBounds", [bounds], nu
ll); |
404 x: Math.round(DevToolsHost.convertLengthForEmbedder(bounds.x)), | |
405 y: Math.round(DevToolsHost.convertLengthForEmbedder(bounds.y)), | |
406 width: Math.round(DevToolsHost.convertLengthForEmbedder(bounds.width))
, | |
407 height: Math.round(DevToolsHost.convertLengthForEmbedder(bounds.height
)) | |
408 }; | |
409 DevToolsAPI.sendMessageToEmbedder("setInspectedPageBounds", [converted],
null); | |
410 }, | 404 }, |
411 | 405 |
412 /** | 406 /** |
413 * @override | 407 * @override |
414 */ | 408 */ |
415 inspectElementCompleted: function() | 409 inspectElementCompleted: function() |
416 { | 410 { |
417 DevToolsAPI.sendMessageToEmbedder("inspectElementCompleted", [], null); | 411 DevToolsAPI.sendMessageToEmbedder("inspectElementCompleted", [], null); |
418 }, | 412 }, |
419 | 413 |
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1059 | 1053 |
1060 if (!DOMTokenList.prototype.__originalDOMTokenListToggle) { | 1054 if (!DOMTokenList.prototype.__originalDOMTokenListToggle) { |
1061 DOMTokenList.prototype.__originalDOMTokenListToggle = DOMTokenList.prototype
.toggle; | 1055 DOMTokenList.prototype.__originalDOMTokenListToggle = DOMTokenList.prototype
.toggle; |
1062 DOMTokenList.prototype.toggle = function(token, force) | 1056 DOMTokenList.prototype.toggle = function(token, force) |
1063 { | 1057 { |
1064 if (arguments.length === 1) | 1058 if (arguments.length === 1) |
1065 force = !this.contains(token); | 1059 force = !this.contains(token); |
1066 return this.__originalDOMTokenListToggle(token, !!force); | 1060 return this.__originalDOMTokenListToggle(token, !!force); |
1067 } | 1061 } |
1068 } | 1062 } |
OLD | NEW |