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

Unified Diff: third_party/WebKit/Source/devtools/front_end/components/CustomPreviewSection.js

Issue 1992493002: [DevTools] Pass bindRemoteObject function to Custom Formatter directly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/components/CustomPreviewSection.js
diff --git a/third_party/WebKit/Source/devtools/front_end/components/CustomPreviewSection.js b/third_party/WebKit/Source/devtools/front_end/components/CustomPreviewSection.js
index 2c7f5ef371e1f41685e12721c26f41ec8a6b28cb..0a6649c2311ee4a5f41931836f059339558b58b9 100644
--- a/third_party/WebKit/Source/devtools/front_end/components/CustomPreviewSection.js
+++ b/third_party/WebKit/Source/devtools/front_end/components/CustomPreviewSection.js
@@ -184,10 +184,11 @@ WebInspector.CustomPreviewSection.prototype = {
* @suppressGlobalPropertiesCheck
* @suppress {undefinedVars}
* @this {Object}
+ * @param {function(!Object, *):*} bindRemoteObject
* @param {*=} formatter
* @param {*=} config
*/
- function load(formatter, config)
+ function load(bindRemoteObject, formatter, config)
{
/**
* @param {*} jsonMLObject
@@ -210,7 +211,7 @@ WebInspector.CustomPreviewSection.prototype = {
if (typeof originObject === "undefined")
throw "Illegal format: obligatory attribute \"object\" isn't specified";
- jsonMLObject[1] = bindRemoteObject(originObject, false, false, null, false, config);
+ jsonMLObject[1] = bindRemoteObject(originObject, config);
startIndex = 2;
}
for (var i = startIndex; i < jsonMLObject.length; ++i)
@@ -228,7 +229,7 @@ WebInspector.CustomPreviewSection.prototype = {
}
var customPreview = this._object.customPreview();
- var args = [{objectId: customPreview.formatterObjectId}];
+ var args = [{objectId: customPreview.bindRemoteObjectFunctionId}, {objectId: customPreview.formatterObjectId}];
if (customPreview.configObjectId)
args.push({objectId: customPreview.configObjectId});
this._object.callFunctionJSON(load, args, onBodyLoaded.bind(this));

Powered by Google App Engine
This is Rietveld 408576698