},
/**
- * @param {string} text
- */
- replaceSelectionWith: function(text)
- {
- },
-
- /**
- * @param {string} query
- * @param {string} text
- */
- replaceAllWith: function(query, text)
- {
- },
-
- /**
* @return {!Array.<!Element>}
*/
elementsToRestoreScrollPositionsFor: function()
title: function() {},
/**
- * @return {!WebInspector.Panel}
+ * @return {!Promise.<!WebInspector.Panel>}
*/
panel: function() {}
}
/**
+ * @interface
+ */
+WebInspector.PanelFactory = function()
+{
+}
+
+WebInspector.PanelFactory.prototype = {
+ /**
+ * @return {!WebInspector.Panel}
+ */
+ createPanel: function() { }
+}
+
+/**
* @constructor
* @param {!Runtime.Extension} extension
* @implements {WebInspector.PanelDescriptor}
},
/**
- * @return {!WebInspector.Panel}
+ * @return {!Promise.<!WebInspector.Panel>}
*/
panel: function()
{
- return /** @type {!WebInspector.Panel} */ (this._extension.instance());
+ return this._extension.instancePromise().then(createPanel);
+
+ /**
+ * @param {!Object} panelFactory
+ * @return {!WebInspector.Panel}
+ */
+ function createPanel(panelFactory)
+ {
+ return /** @type {!WebInspector.PanelFactory} */ (panelFactory).createPanel();
+ }
}
}