Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/sdk/RemoteObject.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/RemoteObject.js b/third_party/WebKit/Source/devtools/front_end/sdk/RemoteObject.js |
| index bba2c6e5f6d1dfe3da730ee0fc25a806ba2bb48f..21a6b04554ea045d0140bebdc50784663908e8e2 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/sdk/RemoteObject.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/sdk/RemoteObject.js |
| @@ -259,6 +259,14 @@ WebInspector.RemoteObject.prototype = { |
| }, |
| /** |
| + * @return {!Promise<!Array<string>>} |
| + */ |
| + getCompletionsPromise: function() |
|
pfeldman
2016/05/03 18:07:25
completionsPromise
|
| + { |
| + throw "Not implemented"; |
| + }, |
| + |
| + /** |
| * @return {!WebInspector.Target} |
| */ |
| target: function() |
| @@ -883,6 +891,27 @@ WebInspector.RemoteObjectImpl.prototype = { |
| this._runtimeAgent.callFunctionOn(this._objectId, functionDeclaration.toString(), args, true, true, false, undefined, mycallback); |
| }, |
| + /** |
| + * @override |
| + * @return {!Promise<!Array<string>>} |
| + */ |
| + getCompletionsPromise: function() |
| + { |
| + var callback; |
| + var promise = new Promise(fulfill => callback = fulfill); |
| + this._runtimeAgent.getCompletions(this._objectId, this.type, didGetCompletions); |
| + return promise; |
| + |
| + /** |
| + * @param {?Protocol.Error} error |
| + * @param {!Array<string>} completions |
| + */ |
| + function didGetCompletions(error, completions) |
| + { |
| + callback(error ? [] : completions); |
| + } |
| + }, |
| + |
| release: function() |
| { |
| if (!this._objectId) |