summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/docs/static/experimental.infobars.html
blob: 43b956c883d2b25e01104257b6d958fa67a642f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<!-- BEGIN AUTHORED CONTENT -->
<p>
The infobars API allows you to add a
horizontal panel just above a tab's contents,
as the following screenshot shows.
</p>

<p>
<img src="images/infobar.png"
  width="566" height="150"
  alt="An infobar asking whether the user wants to translate the current page" />
</p>

<p>
Use an infobar to tell the reader
something about a particular page.
When the user leaves the page for which the infobar is displayed,
Google Chrome automatically closes the infobar.
</p>

<p>
You implement the content of your
infobar using HTML. Because infobars are ordinary pages inside an extension,
they can
<a href="overview.html#pageComm">communicate with other extension pages</a>.
</p>


<h2 id="manifest">Manifest</h2>

<p>
The infobars API is currently
experimental, so you must declare the "experimental"
permission to use it. Also, you should specify
a 16x16-pixel icon for display next to your infobar.
For example:
</p>

<pre>{
  "name": "Andy's infobar extension",
  "version": "1.0",
  <b>"permissions": ["experimental"],</b>
  <b>"icons": {</b>
    <b>"16": "16.png"</b>
  <b>},</b>
  "background": {
    "scripts": ["background.js"]
  }
}</pre>

<!-- END AUTHORED CONTENT -->