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

Side by Side Diff: Source/devtools/front_end/console/ConsoleViewMessage.js

Issue 1107233003: Devtools: [CustomFormatter] Add context menu to disassemble custom previews (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 378
379 /** 379 /**
380 * @param {!WebInspector.RemoteObject} output 380 * @param {!WebInspector.RemoteObject} output
381 * @param {boolean=} forceObjectFormat 381 * @param {boolean=} forceObjectFormat
382 * @param {boolean=} includePreview 382 * @param {boolean=} includePreview
383 * @return {!Element} 383 * @return {!Element}
384 */ 384 */
385 _formatParameter: function(output, forceObjectFormat, includePreview) 385 _formatParameter: function(output, forceObjectFormat, includePreview)
386 { 386 {
387 if (output.customPreview()) { 387 if (output.customPreview()) {
388 return WebInspector.CustomPreviewSection.createInShadow(output); 388 return (new WebInspector.CustomPreviewComponent(output)).element;
389 } 389 }
390 390
391 var type = forceObjectFormat ? "object" : (output.subtype || output.type ); 391 var type = forceObjectFormat ? "object" : (output.subtype || output.type );
392 var formatter = this._customFormatters[type] || this._formatParameterAsV alue; 392 var formatter = this._customFormatters[type] || this._formatParameterAsV alue;
393 var span = createElement("span"); 393 var span = createElement("span");
394 span.className = "object-value-" + type + " source-code"; 394 span.className = "object-value-" + type + " source-code";
395 formatter.call(this, output, span, includePreview); 395 formatter.call(this, output, span, includePreview);
396 return span; 396 return span;
397 }, 397 },
398 398
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after
1296 { 1296 {
1297 if (!this._wrapperElement) { 1297 if (!this._wrapperElement) {
1298 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this ); 1298 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this );
1299 this._wrapperElement.classList.toggle("collapsed", this._collapsed); 1299 this._wrapperElement.classList.toggle("collapsed", this._collapsed);
1300 } 1300 }
1301 return this._wrapperElement; 1301 return this._wrapperElement;
1302 }, 1302 },
1303 1303
1304 __proto__: WebInspector.ConsoleViewMessage.prototype 1304 __proto__: WebInspector.ConsoleViewMessage.prototype
1305 } 1305 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698