Index: docs/info_bar_extension_api.md |
diff --git a/docs/info_bar_extension_api.md b/docs/info_bar_extension_api.md |
new file mode 100644 |
index 0000000000000000000000000000000000000000..626f034555534f9421addd5d555f389263657a47 |
--- /dev/null |
+++ b/docs/info_bar_extension_api.md |
@@ -0,0 +1,32 @@ |
+# Introduction |
+ |
+Lots of extensions want to show infobars for various reasons. Though the infobars usually follow the pattern of a string of text and a few buttons, they sometimes also want to show richer controls. |
Bons
2015/08/20 20:16:50
propose to delete
|
+ |
+This proposal is to add an API to chrome to let extensions show infobars backed by HTML. |
+ |
+ |
+# Details |
+ |
+Since infobars do not take up any persistent space in the UI, they do not need to be registered in the manifest. |
+ |
+Their programmatic API is very simple: |
+ |
+``` |
+// Shows an infobar in the specified tab. The infobar will be closed automatically when the tab |
+// navigates. Use window.close() to close the infobar before then. If no |tabId| is specified |
+// the infobar will open in the currently selected tab. |
+void chrome.experimental.infobars.show({optional int tabId, string htmlPath}, optional void callback(window)); |
+ |
+``` |
+ |
+Infobars are scoped to the lifetime of a document, similar to page actions. When the document they are attached to is navigated or closed, they disappear automatically. |
+ |
+# Display |
+ |
+The HTML rendered inside the infobar should get some default CSS that automatically makes the the layout look like a Chrome infobar. |
+ |
+Extension infobars should be limited to a max of 2x the size of current Chrome native infobars. |
+ |
+# Open Questions |
+ |
+ * What happens when multiple infobars (either extension infobars or native ones) are displayed on the same tab? |