| Index: third_party/WebKit/Source/devtools/front_end/Runtime.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/Runtime.js b/third_party/WebKit/Source/devtools/front_end/Runtime.js
|
| index 9056bd16ad155f40503f0416a86090019c83bd32..f27cccdaab8ed22a728c185730d0152a42dc708a 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/Runtime.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/Runtime.js
|
| @@ -557,6 +557,27 @@ Runtime.prototype = {
|
| this._cachedTypeClasses[typeName] = /** @type function(new:Object) */(object);
|
| }
|
| return this._cachedTypeClasses[typeName] || null;
|
| + },
|
| +
|
| + /**
|
| + * @param {!Object} object
|
| + * @return {!Promise<!Array<!Object>>}
|
| + */
|
| + adapt: function(object)
|
| + {
|
| + return this.instancesPromise(Runtime.Adapter, object).then(processAdapters);
|
| +
|
| + /**
|
| + * @param {!Array<!Runtime.Adapter>} adapters
|
| + * @return {!Promise<!Array<!Object>>}
|
| + */
|
| + function processAdapters(adapters)
|
| + {
|
| + var promises = [];
|
| + for (var adapter of adapters)
|
| + promises.push(adapter.adapt(object));
|
| + return /** @type {!Promise<!Array<!Object>>} */ (Runtime._some(promises));
|
| + }
|
| }
|
| }
|
|
|
| @@ -1076,6 +1097,19 @@ Runtime.Experiment.prototype = {
|
| }
|
| }
|
|
|
| +/**
|
| + * @interface
|
| + */
|
| +Runtime.Adapter = function() { }
|
| +
|
| +Runtime.Adapter.prototype = {
|
| + /**
|
| + * @param {!Object} from
|
| + * @return {!Promise<?Object>}
|
| + */
|
| + adapt: function(from) { }
|
| +}
|
| +
|
| {(function parseQueryParameters()
|
| {
|
| var queryParams = location.search;
|
|
|