Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: chrome/common/extensions/docs/static/experimental.infobars.html

Issue 3137039: Copyedit pass on new doc (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <!-- BEGIN AUTHORED CONTENT --> 1 <!-- BEGIN AUTHORED CONTENT -->
2 <p>The infobars API allows you to add 2 <p>
3 horizontal panels to the top of tabs. 3 The infobars API allows you to add a
4 horizontal panel just above a tab's contents,
5 as the following screenshot shows.
6 </p>
4 7
5 <p><img src="infobars.png" width="598"> 8 <p>
9 <img src="images/infobar.png"
10 width="566" height="150"
11 alt="An infobar asking whether the user wants to translate the current page" / >
12 </p>
6 13
7 <p>You implement the content of your 14 <p>
8 infobar using HTML. Just like with other 15 Use an infobar to tell the reader
9 parts of the extension system, you can 16 something about a particular page.
10 communicate to an from the infobar 17 When the user leaves the page for which the infobar is displayed,
11 using APIs like 18 Google Chrome automatically closes the infobar.
12 <a href="extension.html#method-getBackgroundPage" 19 </p>
13 >chrome.extension.getBackgroundPage()</a>
14 and
15 <a href="extension.html#method-getViews"
16 >chrome.extension.getViews()</a>.
17 20
18 <p>Infobars should be used to tell users 21 <p>
19 something about a particular page. Google 22 You implement the content of your
20 Chrome automatically closes an infobar when 23 infobar using HTML. Because infobars are ordinary pages inside an extension,
21 the page that it was displayed for is navigated 24 they can
22 elsewhere. 25 <a href="overview.html#pageComm">communicate with other extension pages</a>.
26 </p>
27
23 28
24 <h2 id="manifest">Manifest</h2> 29 <h2 id="manifest">Manifest</h2>
25 30
26 <p>Because the Infobars API is currently 31 <p>
27 experimental, you must declare the "experimental" 32 The infobars API is currently
33 experimental, so you must declare the "experimental"
28 permission to use it. Also, you should specify 34 permission to use it. Also, you should specify
29 a 16x16-pixel icon for display next to your infobar. 35 a 16x16-pixel icon for display next to your infobar.
30 For example: 36 For example:
37 </p>
31 38
32 <pre>{ 39 <pre>{
33 "name": "Andy's infobar extension", 40 "name": "Andy's infobar extension",
34 "version": "1.0", 41 "version": "1.0",
35 <b>"permissions": ["experimental"],</b> 42 <b>"permissions": ["experimental"],</b>
36 <b>"icons": {</b> 43 <b>"icons": {</b>
37 <b>"16": "16.png"</b> 44 <b>"16": "16.png"</b>
38 <b>},</b> 45 <b>},</b>
39 "background_page": "background.html" 46 "background_page": "background.html"
40 }</pre> 47 }</pre>
41 48
42 <!-- END AUTHORED CONTENT --> 49 <!-- END AUTHORED CONTENT -->
OLDNEW
« no previous file with comments | « chrome/common/extensions/docs/samples.json ('k') | chrome/common/extensions/docs/static/experimental.omnibox.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698