Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/devtools.js

Issue 2039013002: [DevTools] Fix problem with loading source maps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/devtools/devtools_ui_bindings.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 * @param {string} panelName 295 * @param {string} panelName
296 */ 296 */
297 showPanel: function(panelName) 297 showPanel: function(panelName)
298 { 298 {
299 this._dispatchOnInspectorFrontendAPI("showPanel", [panelName]); 299 this._dispatchOnInspectorFrontendAPI("showPanel", [panelName]);
300 }, 300 },
301 301
302 /** 302 /**
303 * @param {number} id 303 * @param {number} id
304 * @param {string} chunk 304 * @param {string} chunk
305 * @param {boolean} encoded
305 */ 306 */
306 streamWrite: function(id, chunk) 307 streamWrite: function(id, chunk, encoded)
307 { 308 {
308 this._dispatchOnInspectorFrontendAPI("streamWrite", [id, chunk]); 309 this._dispatchOnInspectorFrontendAPI("streamWrite", [id, encoded ? this. _decodeBase64(chunk) : chunk]);
310 },
311
312 /**
313 * @param {string} chunk
314 * @return {string}
315 */
316 _decodeBase64: function(chunk)
317 {
318 var request = new XMLHttpRequest();
319 request.open("GET", "data:text/plain;base64," + chunk, false);
320 request.send(null);
321 if (request.status === 200) {
322 return request.responseText;
323 } else {
324 console.error("Error while decoding chunk in streamWrite");
325 return "";
326 }
309 } 327 }
310 } 328 }
311 329
312 var DevToolsAPI = new DevToolsAPIImpl(); 330 var DevToolsAPI = new DevToolsAPIImpl();
313 window.DevToolsAPI = DevToolsAPI; 331 window.DevToolsAPI = DevToolsAPI;
314 332
315 // InspectorFrontendHostImpl -------------------------------------------------- 333 // InspectorFrontendHostImpl --------------------------------------------------
316 334
317 /** 335 /**
318 * @constructor 336 * @constructor
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after
1051 1069
1052 if (!DOMTokenList.prototype.__originalDOMTokenListToggle) { 1070 if (!DOMTokenList.prototype.__originalDOMTokenListToggle) {
1053 DOMTokenList.prototype.__originalDOMTokenListToggle = DOMTokenList.prototype .toggle; 1071 DOMTokenList.prototype.__originalDOMTokenListToggle = DOMTokenList.prototype .toggle;
1054 DOMTokenList.prototype.toggle = function(token, force) 1072 DOMTokenList.prototype.toggle = function(token, force)
1055 { 1073 {
1056 if (arguments.length === 1) 1074 if (arguments.length === 1)
1057 force = !this.contains(token); 1075 force = !this.contains(token);
1058 return this.__originalDOMTokenListToggle(token, !!force); 1076 return this.__originalDOMTokenListToggle(token, !!force);
1059 } 1077 }
1060 } 1078 }
OLDNEW
« no previous file with comments | « chrome/browser/devtools/devtools_ui_bindings.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698