Home | History | Annotate | Download | only in api
      1 // Copyright 2013 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 [
      6   {
      7     "namespace": "infobars",
      8     "description": "Use the <code>chrome.infobars</code> API to add a horizontal panel just above a tab's contents. See the screenshot below.",
      9     "compiler_options": {
     10       "implemented_in": "chrome/browser/infobars/infobar_extension_api.h"
     11     },
     12     "types": [],
     13     "functions": [
     14       {
     15         "name": "show",
     16         "type": "function",
     17         "description": "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.",
     18         "parameters": [
     19           {
     20             "name": "details",
     21             "type": "object",
     22             "properties": {
     23               "tabId": {
     24                 "type": "integer",
     25                 "description": "The tab id for the tab to display the infobar in."
     26               },
     27               "path": {
     28                 "type": "string",
     29                 "description": "The html file that contains the infobar."
     30               },
     31               "height": {
     32                 "type": "integer",
     33                 "description": "The height (in pixels) of the infobar to show. If omitted, the default infobar height will be used.",
     34                 "optional": true,
     35                 "minimum": 0,
     36                 "maximum": 72
     37               }
     38             }
     39           },
     40           {
     41             "type": "function",
     42             "name": "callback",
     43             "optional": true,
     44             "parameters": [
     45               {
     46                 "name": "window", "$ref": "windows.Window", "description": "Contains details about the window in which the infobar was created."
     47               }
     48             ]
     49           }
     50         ]
     51       }
     52     ]
     53   }
     54 ]
     55