| OLD | NEW |
| 1 <!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc.
Note: | 1 <!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc.
Note: |
| 2 1) The <head> information in this page is significant, should be uniform | 2 1) The <head> information in this page is significant, should be uniform |
| 3 across api docs and should be edited only with knowledge of the | 3 across api docs and should be edited only with knowledge of the |
| 4 templating mechanism. | 4 templating mechanism. |
| 5 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a | 5 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a |
| 6 browser, it will be re-generated from the template, json schema and | 6 browser, it will be re-generated from the template, json schema and |
| 7 authored overview content. | 7 authored overview content. |
| 8 4) The <body>.innerHTML is also generated by an offline step so that this | 8 4) The <body>.innerHTML is also generated by an offline step so that this |
| 9 page may easily be indexed by search engines. | 9 page may easily be indexed by search engines. |
| 10 --><html xmlns="http://www.w3.org/1999/xhtml"><head> | 10 --><html xmlns="http://www.w3.org/1999/xhtml"><head> |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 </div> | 282 </div> |
| 283 <!-- /TABLE OF CONTENTS --> | 283 <!-- /TABLE OF CONTENTS --> |
| 284 | 284 |
| 285 <!-- Standard content lead-in for experimental API pages --> | 285 <!-- Standard content lead-in for experimental API pages --> |
| 286 <p id="classSummary"> | 286 <p id="classSummary"> |
| 287 For information on how to use experimental APIs, see the <a href="expe
rimental.html">chrome.experimental.* APIs</a> page. | 287 For information on how to use experimental APIs, see the <a href="expe
rimental.html">chrome.experimental.* APIs</a> page. |
| 288 </p> | 288 </p> |
| 289 | 289 |
| 290 <!-- STATIC CONTENT PLACEHOLDER --> | 290 <!-- STATIC CONTENT PLACEHOLDER --> |
| 291 <div id="static"><!-- BEGIN AUTHORED CONTENT --> | 291 <div id="static"><!-- BEGIN AUTHORED CONTENT --> |
| 292 <p>The infobars API allows you to add | 292 <p> |
| 293 horizontal panels to the top of tabs. | 293 The infobars API allows you to add a |
| 294 horizontal panel just above a tab's contents, |
| 295 as the following screenshot shows. |
| 296 </p> |
| 294 | 297 |
| 295 </p><p><img src="infobars.png" width="598"> | 298 <p> |
| 299 <img src="images/infobar.png" width="566" height="150" alt="An infobar asking wh
ether the user wants to translate the current page"> |
| 300 </p> |
| 296 | 301 |
| 297 </p><p>You implement the content of your | 302 <p> |
| 298 infobar using HTML. Just like with other | 303 Use an infobar to tell the reader |
| 299 parts of the extension system, you can | 304 something about a particular page. |
| 300 communicate to an from the infobar | 305 When the user leaves the page for which the infobar is displayed, |
| 301 using APIs like | 306 Google Chrome automatically closes the infobar. |
| 302 <a href="extension.html#method-getBackgroundPage">chrome.extension.getBackground
Page()</a> | 307 </p> |
| 303 and | |
| 304 <a href="extension.html#method-getViews">chrome.extension.getViews()</a>. | |
| 305 | 308 |
| 306 </p><p>Infobars should be used to tell users | 309 <p> |
| 307 something about a particular page. Google | 310 You implement the content of your |
| 308 Chrome automatically closes an infobar when | 311 infobar using HTML. Because infobars are ordinary pages inside an extension, |
| 309 the page that it was displayed for is navigated | 312 they can |
| 310 elsewhere. | 313 <a href="overview.html#pageComm">communicate with other extension pages</a>. |
| 314 </p> |
| 311 | 315 |
| 312 </p><h2 id="manifest">Manifest</h2> | |
| 313 | 316 |
| 314 <p>Because the Infobars API is currently | 317 <h2 id="manifest">Manifest</h2> |
| 315 experimental, you must declare the "experimental" | 318 |
| 319 <p> |
| 320 The infobars API is currently |
| 321 experimental, so you must declare the "experimental" |
| 316 permission to use it. Also, you should specify | 322 permission to use it. Also, you should specify |
| 317 a 16x16-pixel icon for display next to your infobar. | 323 a 16x16-pixel icon for display next to your infobar. |
| 318 For example: | 324 For example: |
| 325 </p> |
| 319 | 326 |
| 320 </p><pre>{ | 327 <pre>{ |
| 321 "name": "Andy's infobar extension", | 328 "name": "Andy's infobar extension", |
| 322 "version": "1.0", | 329 "version": "1.0", |
| 323 <b>"permissions": ["experimental"],</b> | 330 <b>"permissions": ["experimental"],</b> |
| 324 <b>"icons": {</b> | 331 <b>"icons": {</b> |
| 325 <b>"16": "16.png"</b> | 332 <b>"16": "16.png"</b> |
| 326 <b>},</b> | 333 <b>},</b> |
| 327 "background_page": "background.html" | 334 "background_page": "background.html" |
| 328 }</pre> | 335 }</pre> |
| 329 | 336 |
| 330 <!-- END AUTHORED CONTENT --> | 337 <!-- END AUTHORED CONTENT --> |
| (...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 800 _uff=0; | 807 _uff=0; |
| 801 urchinTracker(); | 808 urchinTracker(); |
| 802 } | 809 } |
| 803 catch(e) {/* urchinTracker not available. */} | 810 catch(e) {/* urchinTracker not available. */} |
| 804 </script> | 811 </script> |
| 805 <!-- end analytics --> | 812 <!-- end analytics --> |
| 806 </div> | 813 </div> |
| 807 </div> <!-- /gc-footer --> | 814 </div> <!-- /gc-footer --> |
| 808 </div> <!-- /gc-container --> | 815 </div> <!-- /gc-container --> |
| 809 </body></html> | 816 </body></html> |
| OLD | NEW |