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

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

Issue 10642015: Basic setup for generating app docs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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
(Empty)
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
3 across api docs and should be edited only with knowledge of the
4 templating mechanism.
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
7 authored overview content.
8 4) The <body>.innerHTML is also generated by an offline step so that this
9 page may easily be indexed by search engines.
10 --><html xmlns="http://www.w3.org/1999/xhtml"><head>
11 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
12 <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css">
13 <link href="css/print.css" rel="stylesheet" type="text/css" media="print">
14 <script type="text/javascript" src="../../../third_party/jstemplate/jstempla te_compiled.js">
15 </script>
16 <script type="text/javascript" src="../../../../third_party/json_minify/mini fy-sans-regexp.js">
17 </script>
18 <script type="text/javascript" src="js/api_page_generator.js"></script>
19 <script type="text/javascript" src="js/bootstrap.js"></script>
20 <script type="text/javascript" src="js/sidebar.js"></script>
21 <meta name="description" content="Documentation for the chrome.experimental.in fobars module, which is part of the Google Chrome extension APIs."><title>chrom e.experimental.infobars - Google Chrome Extensions - Google Code</title></head>
22 <body> <div id="devModeWarning" class="displayModeWarning">
23 You are viewing extension docs in chrome via the 'file:' scheme: are you exp ecting to see local changes when you refresh? You'll need run chrome with --allo w-file-access-from-files.
24 </div>
25 <div id="branchWarning" class="displayModeWarning">
26 <span>WARNING: This is the <span id="branchName">BETA</span> documentation.
27 It may not work with the stable release of Chrome.</span>
28 <select id="branchChooser">
29 <option>Choose a different version...
30 </option><option value="">Stable
31 </option><option value="beta">Beta
32 </option><option value="dev">Dev
33 </option><option value="trunk">Trunk
34 </option></select>
35 </div>
36 <div id="unofficialWarning" class="displayModeWarning">
37 <span>WARNING: This is unofficial documentation. It may not work with the
38 current release of Chrome.</span>
39 <button id="goToOfficialDocs">Go to the official docs</button>
40 </div>
41 <div id="gc-container" class="labs">
42 <!-- SUBTEMPLATES: DO NOT MOVE FROM THIS LOCATION -->
43 <!-- In particular, sub-templates that recurse, must be used by allowing
44 jstemplate to make a copy of the template in this section which
45 are not operated on by way of the jsskip="true" -->
46 <!-- /SUBTEMPLATES -->
47 <a id="top"></a>
48 <div id="skipto">
49 <a href="#gc-pagecontent">Skip to page content</a>
50 <a href="#gc-toc">Skip to main navigation</a>
51 </div>
52 <!-- API HEADER -->
53 <table id="header" width="100%" cellspacing="0" border="0">
54 <tbody><tr>
55 <td valign="middle"><a href="http://code.google.com/"><img src="images/c ode_labs_logo.gif" height="43" width="161" alt="Google Code Labs" style="border: 0; margin:0;"></a></td>
56 <td valign="middle" width="100%" style="padding-left:0.6em;">
57 <form action="http://www.google.com/cse" id="cse" style="margin-top:0. 5em">
58 <div id="gsc-search-box">
59 <input type="hidden" name="cx" value="002967670403910741006:61_cvz fqtno">
60 <input type="hidden" name="ie" value="UTF-8">
61 <input type="text" name="q" value="" size="55">
62 <input class="gsc-search-button" type="submit" name="sa" value="Se arch">
63 <br>
64 <span class="greytext">e.g. "page action" or "tabs"</span>
65 </div>
66 </form>
67 <script type="text/javascript" src="https://www.google.com/jsapi"></sc ript>
68 <script type="text/javascript">google.load("elements", "1", {packages: "transliteration"});</script>
69 <script type="text/javascript" src="https://www.google.com/coop/cse/t1 3n?form=cse&amp;t13n_langs=en"></script>
70 <script type="text/javascript" src="https://www.google.com/coop/cse/br and?form=cse&amp;lang=en"></script>
71 </td>
72 </tr>
73 </tbody></table>
74 <div id="codesiteContent" class="">
75 <a id="gc-topnav-anchor"></a>
76 <div id="gc-topnav">
77 <h1>Google Chrome Extensions (<a href="http://code.google.com/labs/">Lab s</a>)</h1>
78 <ul id="home" class="gc-topnav-tabs">
79 <li id="home_link">
80 <a href="index.html" title="Google Chrome Extensions home page">Home </a>
81 </li>
82 <li id="docs_link">
83 <a href="docs.html" title="Official Google Chrome Extensions documen tation">Docs</a>
84 </li>
85 <li id="faq_link">
86 <a href="faq.html" title="Answers to frequently asked questions abou t Google Chrome Extensions">FAQ</a>
87 </li>
88 <li id="samples_link">
89 <a href="samples.html" title="Sample extensions (with source code)"> Samples</a>
90 </li>
91 <li id="group_link">
92 <a href="http://groups.google.com/a/chromium.org/group/chromium-exte nsions" title="Google Chrome Extensions developer forum">Group</a>
93 </li>
94 <li id="so_link">
95 <a href="http://stackoverflow.com/questions/tagged/google-chrome-ext ension" title="[google-chrome-extension] tag on Stack Overflow">Questions?</a>
96 </li>
97 </ul>
98 </div> <!-- end gc-topnav -->
99 <div class="g-section g-tpl-170">
100 <!-- SIDENAV -->
101 <div class="g-unit g-first" id="gc-toc">
102 <ul>
103 <li><a href="getstarted.html">Getting Started</a></li>
104 <li><a href="overview.html">Overview</a></li>
105 <li><a href="whats_new.html">What's New?</a></li>
106 <li><h2><a href="devguide.html">Developer's Guide</a></h2>
107 <ul>
108 <li>Browser UI
109 <ul>
110 <li><a href="browserAction.html">Browser Actions</a></li>
111 <li><a href="contextMenus.html">Context Menus</a></li>
112 <li><a href="notifications.html">Desktop Notifications</a></li >
113 <li><a href="omnibox.html">Omnibox</a></li>
114 <li><a href="options.html">Options Pages</a></li>
115 <li><a href="override.html">Override Pages</a></li>
116 <li><a href="pageAction.html">Page Actions</a></li>
117 </ul>
118 </li>
119 <li>Browser Interaction
120 <ul>
121 <li><a href="bookmarks.html">Bookmarks</a></li>
122 <li><a href="cookies.html">Cookies</a></li>
123 <li><a href="devtools.html">Developer Tools</a></li>
124 <li><a href="events.html">Events</a></li>
125 <li><a href="history.html">History</a></li>
126 <li><a href="management.html">Management</a></li>
127 <li><a href="tabs.html">Tabs</a></li>
128 <li><a href="windows.html">Windows</a></li>
129 </ul>
130 </li>
131 <li>Implementation
132 <ul>
133 <li><a href="a11y.html">Accessibility</a></li>
134 <li><a href="background_pages.html">Background Pages</a></li>
135 <li><a href="content_scripts.html">Content Scripts</a></li>
136 <li><a href="xhr.html">Cross-Origin XHR</a></li>
137 <li><a href="i18n.html">Internationalization</a></li>
138 <li><a href="messaging.html">Message Passing</a></li>
139 <li><a href="permissions.html">Optional Permissions</a></li>
140 <li><a href="npapi.html">NPAPI Plugins</a></li>
141 </ul>
142 </li>
143 <li>Finishing
144 <ul>
145 <li><a href="hosting.html">Hosting</a></li>
146 <li><a href="external_extensions.html">Other Deployment Option s</a></li>
147 </ul>
148 </li>
149 </ul>
150 </li>
151 <li><h2><a href="apps.html">Packaged Apps</a></h2></li>
152 <li><h2><a href="tutorials.html">Tutorials</a></h2>
153 <ul>
154 <li><a href="tut_debugging.html">Debugging</a></li>
155 <li><a href="tut_analytics.html">Google Analytics</a></li>
156 <li><a href="tut_oauth.html">OAuth</a></li>
157 </ul>
158 </li>
159 <li><h2>Reference</h2>
160 <ul>
161 <li>Formats
162 <ul>
163 <li><a href="manifest.html">Manifest Files</a></li>
164 <li><a href="match_patterns.html">Match Patterns</a></li>
165 </ul>
166 </li>
167 <li><a href="permission_warnings.html">Permission Warnings</a></li >
168 <li><a href="api_index.html">chrome.* APIs</a></li>
169 <li><a href="api_other.html">Other APIs</a></li>
170 </ul>
171 </li>
172 <li><h2><a href="samples.html">Samples</a></h2></li>
173 <div class="line"> </div>
174 <li><h2>More</h2>
175 <ul>
176 <li><a href="http://code.google.com/chrome/webstore/docs/index.htm l">Chrome Web Store</a></li>
177 <li><a href="http://code.google.com/chrome/apps/docs/developers_gu ide.html">Hosted Apps</a></li>
178 <li><a href="themes.html">Themes</a></li>
179 </ul>
180 </li>
181 </ul>
182 </div>
183 <script>
184 initToggles();
185 </script>
186 <div class="g-unit" id="gc-pagecontent">
187 <div id="pageTitle">
188 <h1 class="page_title">chrome.experimental.infobars</h1>
189 </div>
190 <!-- TABLE OF CONTENTS -->
191 <div id="toc">
192 <h2>Contents</h2>
193 <ol>
194 <li>
195 <a href="#manifest">Manifest</a>
196 <ol>
197 </ol>
198 </li>
199 <li>
200 <a href="#apiReference">API reference: chrome.experimental.infob ars</a>
201 <ol>
202 <li>
203 <a href="#global-methods">Methods</a>
204 <ol>
205 <li>
206 <a href="#method-show">show</a>
207 </li>
208 </ol>
209 </li>
210 </ol>
211 </li>
212 </ol>
213 </div>
214 <!-- /TABLE OF CONTENTS -->
215 <!-- Standard content lead-in for experimental API pages -->
216 <p id="classSummary">
217 For information on how to use experimental APIs, see the <a href="expe rimental.html">chrome.experimental.* APIs</a> page.
218 </p>
219 <!-- STATIC CONTENT PLACEHOLDER -->
220 <div id="static"><!-- BEGIN AUTHORED CONTENT -->
221 <p>
222 The infobars API allows you to add a
223 horizontal panel just above a tab's contents,
224 as the following screenshot shows.
225 </p>
226 <p>
227 <img src="images/infobar.png" width="566" height="150" alt="An infobar asking wh ether the user wants to translate the current page">
228 </p>
229 <p>
230 Use an infobar to tell the reader
231 something about a particular page.
232 When the user leaves the page for which the infobar is displayed,
233 Google Chrome automatically closes the infobar.
234 </p>
235 <p>
236 You implement the content of your
237 infobar using HTML. Because infobars are ordinary pages inside an extension,
238 they can
239 <a href="overview.html#pageComm">communicate with other extension pages</a>.
240 </p>
241 <h2 id="manifest">Manifest</h2>
242 <p>
243 The infobars API is currently
244 experimental, so you must declare the "experimental"
245 permission to use it. Also, you should specify
246 a 16x16-pixel icon for display next to your infobar.
247 For example:
248 </p>
249 <pre>{
250 "name": "Andy's infobar extension",
251 "version": "1.0",
252 <b>"permissions": ["experimental"],</b>
253 <b>"icons": {</b>
254 <b>"16": "16.png"</b>
255 <b>},</b>
256 "background": {
257 "scripts": ["background.js"]
258 }
259 }</pre>
260 <!-- END AUTHORED CONTENT -->
261 </div>
262 <!-- API PAGE -->
263 <div class="apiPage">
264 <a name="apiReference"></a>
265 <h2>API reference: chrome.experimental.infobars</h2>
266 <!-- PROPERTIES -->
267 <!-- /apiGroup -->
268 <!-- METHODS -->
269 <div id="methodsTemplate" class="apiGroup">
270 <a name="global-methods"></a>
271 <h3>Methods</h3>
272 <!-- iterates over all functions -->
273 <div class="apiItem">
274 <a name="method-show"></a> <!-- method-anchor -->
275 <h4>show</h4>
276 <div class="summary">
277 <!-- Note: intentionally longer 80 columns -->
278 <span>chrome.experimental.infobars.show</span>(<span class="nu ll"><span>object</span>
279 <var><span>details</span></var></span><span class="optiona l"><span>, </span><span>function</span>
280 <var><span>callback</span></var></span>)</div>
281 <div class="description">
282 <p>Shows an infobar in the specified tab. The infobar will be cl osed automatically when the tab navigates. Use window.close() to close the infob ar before then.</p>
283 <!-- PARAMETERS -->
284 <h4>Parameters</h4>
285 <dl>
286 <div>
287 <div>
288 <dt>
289 <var>details</var>
290 <em>
291 <!-- TYPE -->
292 <div style="display:inline">
293 (
294 <span id="typeTemplate">
295 <span>
296 <span>object</span>
297 </span>
298 </span>
299 )
300 </div>
301 </em>
302 </dt>
303 <dd class="todo">
304 Undocumented.
305 </dd>
306 <!-- OBJECT PROPERTIES -->
307 <dd>
308 <dl>
309 <div>
310 <div>
311 <dt>
312 <var>tabId</var>
313 <em>
314 <!-- TYPE -->
315 <div style="display:inline">
316 (
317 <span id="typeTemplate">
318 <span>
319 <span>integer</span>
320 </span>
321 </span>
322 )
323 </div>
324 </em>
325 </dt>
326 <dd>The tab id for the tab to display the infobar in.</dd>
327 <!-- OBJECT PROPERTIES -->
328 <!-- OBJECT METHODS -->
329 <!-- OBJECT EVENT FIELDS -->
330 <!-- FUNCTION PARAMETERS -->
331 </div>
332 </div><div>
333 <div>
334 <dt>
335 <var>path</var>
336 <em>
337 <!-- TYPE -->
338 <div style="display:inline">
339 (
340 <span id="typeTemplate">
341 <span>
342 <span>string</span>
343 </span>
344 </span>
345 )
346 </div>
347 </em>
348 </dt>
349 <dd>The html file that contains the infobar.</dd>
350 <!-- OBJECT PROPERTIES -->
351 <!-- OBJECT METHODS -->
352 <!-- OBJECT EVENT FIELDS -->
353 <!-- FUNCTION PARAMETERS -->
354 </div>
355 </div><div>
356 <div>
357 <dt>
358 <var>height</var>
359 <em>
360 <!-- TYPE -->
361 <div style="display:inline">
362 (
363 <span class="optional">optional</span>
364 <span id="typeTemplate">
365 <span>
366 <span>integer</span>
367 </span>
368 </span>
369 )
370 </div>
371 </em>
372 </dt>
373 <dd>The height (in pixels) of the infobar to show. If omitted, the def ault infobar height will be used.</dd>
374 <!-- OBJECT PROPERTIES -->
375 <!-- OBJECT METHODS -->
376 <!-- OBJECT EVENT FIELDS -->
377 <!-- FUNCTION PARAMETERS -->
378 </div>
379 </div>
380 </dl>
381 </dd>
382 <!-- OBJECT METHODS -->
383 <!-- OBJECT EVENT FIELDS -->
384 <!-- FUNCTION PARAMETERS -->
385 </div>
386 </div><div>
387 <div>
388 <dt>
389 <var>callback</var>
390 <em>
391 <!-- TYPE -->
392 <div style="display:inline">
393 (
394 <span class="optional">optional</span>
395 <span id="typeTemplate">
396 <span>
397 <span>function</span>
398 </span>
399 </span>
400 )
401 </div>
402 </em>
403 </dt>
404 <dd class="todo">
405 Undocumented.
406 </dd>
407 <!-- OBJECT PROPERTIES -->
408 <!-- OBJECT METHODS -->
409 <!-- OBJECT EVENT FIELDS -->
410 <!-- FUNCTION PARAMETERS -->
411 </div>
412 </div>
413 </dl>
414 <!-- RETURNS -->
415 <dl>
416 </dl>
417 <!-- CALLBACK -->
418 <div>
419 <div>
420 <h4>Callback function</h4>
421 <p>
422 If you specify the <em>callback</em> parameter, it should
423 specify a function that looks like this:
424 </p>
425 <!-- Note: intentionally longer 80 columns -->
426 <pre>function(<span>windows.Window window</span>) <span class= "subdued">{...}</span>;</pre>
427 <dl>
428 <div>
429 <div>
430 <dt>
431 <var>window</var>
432 <em>
433 <!-- TYPE -->
434 <div style="display:inline">
435 (
436 <span id="typeTemplate">
437 <span>
438 <a>windows.Window</a>
439 </span>
440 </span>
441 )
442 </div>
443 </em>
444 </dt>
445 <dd>Contains details about the window in which the infobar was created .</dd>
446 <!-- OBJECT PROPERTIES -->
447 <!-- OBJECT METHODS -->
448 <!-- OBJECT EVENT FIELDS -->
449 <!-- FUNCTION PARAMETERS -->
450 </div>
451 </div>
452 </dl>
453 </div>
454 </div>
455 <!-- MIN_VERSION -->
456 </div> <!-- /description -->
457 </div> <!-- /apiItem -->
458 </div> <!-- /apiGroup -->
459 <!-- EVENTS -->
460 <!-- /apiGroup -->
461 <!-- TYPES -->
462 <!-- /apiGroup -->
463 </div> <!-- /apiPage -->
464 </div> <!-- /gc-pagecontent -->
465 </div> <!-- /g-section -->
466 </div> <!-- /codesiteContent -->
467 <div id="gc-footer" --="">
468 <div class="text">
469 <p>
470 Except as otherwise <a href="http://code.google.com/policies.html#restrictions ">noted</a>,
471 the content of this page is licensed under the <a rel="license" href="http://c reativecommons.org/licenses/by/3.0/">Creative Commons
472 Attribution 3.0 License</a>, and code samples are licensed under the
473 <a rel="license" href="http://code.google.com/google_bsd_license.html">BSD Lic ense</a>.
474 </p>
475 <p>
476 ©2011 Google
477 </p>
478 <!-- begin analytics -->
479 <script src="https://www.google-analytics.com/urchin.js" type="text/javascript"> </script>
480 <script src="https://www.google-analytics.com/ga.js" type="text/javascript"></sc ript>
481 <script type="text/javascript">
482 // chrome doc tracking
483 try {
484 var engdocs = _gat._getTracker("YT-10763712-2");
485 engdocs._trackPageview();
486 } catch(err) {}
487 // code.google.com site-wide tracking
488 try {
489 _uacct="UA-18071-1";
490 _uanchor=1;
491 _uff=0;
492 urchinTracker();
493 }
494 catch(e) {/* urchinTracker not available. */}
495 </script>
496 <!-- end analytics -->
497 </div>
498 </div> <!-- /gc-footer -->
499 </div> <!-- /gc-container -->
500 </body></html>
OLDNEW
« no previous file with comments | « chrome/common/extensions/docs/experimental.idltest.html ('k') | chrome/common/extensions/docs/experimental.input.ime.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698