Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / devtools / front_end / components / Panel.js
index 1ff727c..04b02a1 100644 (file)
@@ -71,21 +71,6 @@ WebInspector.Panel.prototype = {
     },
 
     /**
-     * @param {string} text
-     */
-    replaceSelectionWith: function(text)
-    {
-    },
-
-    /**
-     * @param {string} query
-     * @param {string} text
-     */
-    replaceAllWith: function(query, text)
-    {
-    },
-
-    /**
      * @return {!Array.<!Element>}
      */
     elementsToRestoreScrollPositionsFor: function()
@@ -208,12 +193,26 @@ WebInspector.PanelDescriptor.prototype = {
     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}
@@ -243,10 +242,19 @@ WebInspector.RuntimeExtensionPanelDescriptor.prototype = {
     },
 
     /**
-     * @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();
+        }
     }
 }