Chromium Code Reviews| 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 /* eslint-disable indent */ | 5 /* eslint-disable indent */ |
| 6 (function(window) { | 6 (function(window) { |
| 7 | 7 |
| 8 // DevToolsAPI ---------------------------------------------------------------- | 8 // DevToolsAPI ---------------------------------------------------------------- |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 296 * @param {string} panelName | 296 * @param {string} panelName |
| 297 */ | 297 */ |
| 298 showPanel: function(panelName) | 298 showPanel: function(panelName) |
| 299 { | 299 { |
| 300 this._dispatchOnInspectorFrontendAPI("showPanel", [panelName]); | 300 this._dispatchOnInspectorFrontendAPI("showPanel", [panelName]); |
| 301 }, | 301 }, |
| 302 | 302 |
| 303 /** | 303 /** |
| 304 * @param {number} id | 304 * @param {number} id |
| 305 * @param {string} chunk | 305 * @param {string} chunk |
| 306 * @param {boolean} encoded | |
| 306 */ | 307 */ |
| 307 streamWrite: function(id, chunk) | 308 streamWrite: function(id, chunk, encoded) |
| 308 { | 309 { |
| 309 this._dispatchOnInspectorFrontendAPI("streamWrite", [id, chunk]); | 310 this._dispatchOnInspectorFrontendAPI("streamWrite", [id, chunk, encoded] ); |
|
dgozman
2016/06/02 22:26:18
For backwards compatibility you should window.atob
kozy
2016/06/02 23:00:20
We can use it, I extracted XHRequest to separate f
| |
| 310 } | 311 } |
| 311 } | 312 } |
| 312 | 313 |
| 313 var DevToolsAPI = new DevToolsAPIImpl(); | 314 var DevToolsAPI = new DevToolsAPIImpl(); |
| 314 window.DevToolsAPI = DevToolsAPI; | 315 window.DevToolsAPI = DevToolsAPI; |
| 315 | 316 |
| 316 // InspectorFrontendHostImpl -------------------------------------------------- | 317 // InspectorFrontendHostImpl -------------------------------------------------- |
| 317 | 318 |
| 318 /** | 319 /** |
| 319 * @constructor | 320 * @constructor |
| (...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1053 | 1054 |
| 1054 if (!DOMTokenList.prototype.__originalDOMTokenListToggle) { | 1055 if (!DOMTokenList.prototype.__originalDOMTokenListToggle) { |
| 1055 DOMTokenList.prototype.__originalDOMTokenListToggle = DOMTokenList.prototype .toggle; | 1056 DOMTokenList.prototype.__originalDOMTokenListToggle = DOMTokenList.prototype .toggle; |
| 1056 DOMTokenList.prototype.toggle = function(token, force) | 1057 DOMTokenList.prototype.toggle = function(token, force) |
| 1057 { | 1058 { |
| 1058 if (arguments.length === 1) | 1059 if (arguments.length === 1) |
| 1059 force = !this.contains(token); | 1060 force = !this.contains(token); |
| 1060 return this.__originalDOMTokenListToggle(token, !!force); | 1061 return this.__originalDOMTokenListToggle(token, !!force); |
| 1061 } | 1062 } |
| 1062 } | 1063 } |
| OLD | NEW |