OLD | NEW |
| (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.di
scovery module, which is part of the Google Chrome extension APIs."><title>Expe
rimental Discovery APIs - 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&t13n_langs=en"></script> | |
70 <script type="text/javascript" src="https://www.google.com/coop/cse/br
and?form=cse&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">Experimental Discovery APIs</h1> | |
189 </div> | |
190 <!-- TABLE OF CONTENTS --> | |
191 <div id="toc"> | |
192 <h2>Contents</h2> | |
193 <ol> | |
194 <li> | |
195 <a href="#apiReference">API reference: chrome.experimental.disco
very</a> | |
196 <ol> | |
197 <li> | |
198 <a href="#global-methods">Methods</a> | |
199 <ol> | |
200 <li> | |
201 <a href="#method-clearAllSuggestions">clearAllSuggestions</a> | |
202 </li><li> | |
203 <a href="#method-removeSuggestion">removeSuggestion</a> | |
204 </li><li> | |
205 <a href="#method-suggest">suggest</a> | |
206 </li> | |
207 </ol> | |
208 </li> | |
209 <li> | |
210 <a href="#types">Types</a> | |
211 <ol> | |
212 <li> | |
213 <a href="#type-experimental.discovery.SuggestDetails">experiment
al.discovery.SuggestDetails</a> | |
214 <ol> | |
215 </ol> | |
216 </li> | |
217 </ol> | |
218 </li> | |
219 </ol> | |
220 </li> | |
221 </ol> | |
222 </div> | |
223 <!-- /TABLE OF CONTENTS --> | |
224 <!-- Standard content lead-in for experimental API pages --> | |
225 <!-- STATIC CONTENT PLACEHOLDER --> | |
226 <div id="static"><div id="pageData-name" class="pageData">Experimental D
iscovery APIs</div> | |
227 <!-- BEGIN AUTHORED CONTENT --> | |
228 <p>The current methods allow extensions to inject suggested links in the recomme
nded pane of the New Tab Page.</p> | |
229 <!-- END AUTHORED CONTENT --> | |
230 </div> | |
231 <!-- API PAGE --> | |
232 <div class="apiPage"> | |
233 <a name="apiReference"></a> | |
234 <h2>API reference: chrome.experimental.discovery</h2> | |
235 <!-- PROPERTIES --> | |
236 <!-- /apiGroup --> | |
237 <!-- METHODS --> | |
238 <div id="methodsTemplate" class="apiGroup"> | |
239 <a name="global-methods"></a> | |
240 <h3>Methods</h3> | |
241 <!-- iterates over all functions --> | |
242 <div class="apiItem"> | |
243 <a name="method-clearAllSuggestions"></a> <!-- method-anchor --> | |
244 <h4>clearAllSuggestions</h4> | |
245 <div class="summary"> | |
246 <!-- Note: intentionally longer 80 columns --> | |
247 <span>chrome.experimental.discovery.clearAllSuggestions</span>
()</div> | |
248 <div class="description"> | |
249 <p>Clear all the URLs that were previously suggested for discove
ry by this extension.</p> | |
250 <!-- PARAMETERS --> | |
251 <dl> | |
252 </dl> | |
253 <!-- RETURNS --> | |
254 <dl> | |
255 </dl> | |
256 <!-- CALLBACK --> | |
257 <!-- MIN_VERSION --> | |
258 </div> <!-- /description --> | |
259 </div><div class="apiItem"> | |
260 <a name="method-removeSuggestion"></a> <!-- method-anchor --> | |
261 <h4>removeSuggestion</h4> | |
262 <div class="summary"> | |
263 <!-- Note: intentionally longer 80 columns --> | |
264 <span>chrome.experimental.discovery.removeSuggestion</span>(<s
pan class="null"><span>string</span> | |
265 <var><span>linkUrl</span></var></span>)</div> | |
266 <div class="description"> | |
267 <p>Removes a URL that was previously suggested for discovery by
this extension.</p> | |
268 <!-- PARAMETERS --> | |
269 <h4>Parameters</h4> | |
270 <dl> | |
271 <div> | |
272 <div> | |
273 <dt> | |
274 <var>linkUrl</var> | |
275 <em> | |
276 <!-- TYPE --> | |
277 <div style="display:inline"> | |
278 ( | |
279 <span id="typeTemplate"> | |
280 <span> | |
281 <span>string</span> | |
282 </span> | |
283 </span> | |
284 ) | |
285 </div> | |
286 </em> | |
287 </dt> | |
288 <dd>The URl to remove from discovery. Must be exactly the same as a li
nkUrl previously used on a call to suggest.</dd> | |
289 <!-- OBJECT PROPERTIES --> | |
290 <!-- OBJECT METHODS --> | |
291 <!-- OBJECT EVENT FIELDS --> | |
292 <!-- FUNCTION PARAMETERS --> | |
293 </div> | |
294 </div> | |
295 </dl> | |
296 <!-- RETURNS --> | |
297 <dl> | |
298 </dl> | |
299 <!-- CALLBACK --> | |
300 <!-- MIN_VERSION --> | |
301 </div> <!-- /description --> | |
302 </div><div class="apiItem"> | |
303 <a name="method-suggest"></a> <!-- method-anchor --> | |
304 <h4>suggest</h4> | |
305 <div class="summary"> | |
306 <!-- Note: intentionally longer 80 columns --> | |
307 <span>chrome.experimental.discovery.suggest</span>(<span class
="null"><span>experimental.discovery.SuggestDetails</span> | |
308 <var><span>details</span></var></span>)</div> | |
309 <div class="description"> | |
310 <p>Suggests a URL for discovery.</p> | |
311 <!-- PARAMETERS --> | |
312 <h4>Parameters</h4> | |
313 <dl> | |
314 <div> | |
315 <div> | |
316 <dt> | |
317 <var>details</var> | |
318 <em> | |
319 <!-- TYPE --> | |
320 <div style="display:inline"> | |
321 ( | |
322 <span id="typeTemplate"> | |
323 <span> | |
324 <a href="experimental.discovery.html#type-experimental.d
iscovery.SuggestDetails">experimental.discovery.SuggestDetails</a> | |
325 </span> | |
326 </span> | |
327 ) | |
328 </div> | |
329 </em> | |
330 </dt> | |
331 <dd>Detailed information on the URL to suggest.</dd> | |
332 <!-- OBJECT PROPERTIES --> | |
333 <!-- OBJECT METHODS --> | |
334 <!-- OBJECT EVENT FIELDS --> | |
335 <!-- FUNCTION PARAMETERS --> | |
336 </div> | |
337 </div> | |
338 </dl> | |
339 <!-- RETURNS --> | |
340 <dl> | |
341 </dl> | |
342 <!-- CALLBACK --> | |
343 <!-- MIN_VERSION --> | |
344 </div> <!-- /description --> | |
345 </div> <!-- /apiItem --> | |
346 </div> <!-- /apiGroup --> | |
347 <!-- EVENTS --> | |
348 <!-- /apiGroup --> | |
349 <!-- TYPES --> | |
350 <div class="apiGroup"> | |
351 <a name="types"></a> | |
352 <h3 id="types">Types</h3> | |
353 <!-- iterates over all types --> | |
354 <div class="apiItem"> | |
355 <a name="type-experimental.discovery.SuggestDetails"></a> | |
356 <h4>experimental.discovery.SuggestDetails</h4> | |
357 <div> | |
358 <dt> | |
359 <em> | |
360 <!-- TYPE --> | |
361 <div style="display:inline"> | |
362 ( | |
363 <span id="typeTemplate"> | |
364 <span> | |
365 <span>object</span> | |
366 </span> | |
367 </span> | |
368 ) | |
369 </div> | |
370 </em> | |
371 </dt> | |
372 <dd class="todo"> | |
373 Undocumented. | |
374 </dd> | |
375 <!-- OBJECT PROPERTIES --> | |
376 <dd> | |
377 <dl> | |
378 <div> | |
379 <div> | |
380 <dt> | |
381 <var>linkText</var> | |
382 <em> | |
383 <!-- TYPE --> | |
384 <div style="display:inline"> | |
385 ( | |
386 <span id="typeTemplate"> | |
387 <span> | |
388 <span>string</span> | |
389 </span> | |
390 </span> | |
391 ) | |
392 </div> | |
393 </em> | |
394 </dt> | |
395 <dd>The linkified text. It should be relatively short.</dd> | |
396 <!-- OBJECT PROPERTIES --> | |
397 <!-- OBJECT METHODS --> | |
398 <!-- OBJECT EVENT FIELDS --> | |
399 <!-- FUNCTION PARAMETERS --> | |
400 </div> | |
401 </div><div> | |
402 <div> | |
403 <dt> | |
404 <var>linkUrl</var> | |
405 <em> | |
406 <!-- TYPE --> | |
407 <div style="display:inline"> | |
408 ( | |
409 <span id="typeTemplate"> | |
410 <span> | |
411 <span>string</span> | |
412 </span> | |
413 </span> | |
414 ) | |
415 </div> | |
416 </em> | |
417 </dt> | |
418 <dd>The URL to suggest and that will be displayed in the new tab page
under the recommended pane.</dd> | |
419 <!-- OBJECT PROPERTIES --> | |
420 <!-- OBJECT METHODS --> | |
421 <!-- OBJECT EVENT FIELDS --> | |
422 <!-- FUNCTION PARAMETERS --> | |
423 </div> | |
424 </div><div> | |
425 <div> | |
426 <dt> | |
427 <var>score</var> | |
428 <em> | |
429 <!-- TYPE --> | |
430 <div style="display:inline"> | |
431 ( | |
432 <span class="optional">optional</span> | |
433 <span id="typeTemplate"> | |
434 <span> | |
435 <span>number</span> | |
436 </span> | |
437 </span> | |
438 ) | |
439 </div> | |
440 </em> | |
441 </dt> | |
442 <dd>A score indicating how interesting that suggestion is. The value m
ust be between 0 and 1. A suggestion with score 1 is twice as likely to be displ
ayed than one with a score of 0.5. Defaults to 1. TODO: need minimum=0 and maxim
um=1.</dd> | |
443 <!-- OBJECT PROPERTIES --> | |
444 <!-- OBJECT METHODS --> | |
445 <!-- OBJECT EVENT FIELDS --> | |
446 <!-- FUNCTION PARAMETERS --> | |
447 </div> | |
448 </div> | |
449 </dl> | |
450 </dd> | |
451 <!-- OBJECT METHODS --> | |
452 <!-- OBJECT EVENT FIELDS --> | |
453 <!-- FUNCTION PARAMETERS --> | |
454 </div> | |
455 </div> <!-- /apiItem --> | |
456 </div> <!-- /apiGroup --> | |
457 </div> <!-- /apiPage --> | |
458 </div> <!-- /gc-pagecontent --> | |
459 </div> <!-- /g-section --> | |
460 </div> <!-- /codesiteContent --> | |
461 <div id="gc-footer" --=""> | |
462 <div class="text"> | |
463 <p> | |
464 Except as otherwise <a href="http://code.google.com/policies.html#restrictions
">noted</a>, | |
465 the content of this page is licensed under the <a rel="license" href="http://c
reativecommons.org/licenses/by/3.0/">Creative Commons | |
466 Attribution 3.0 License</a>, and code samples are licensed under the | |
467 <a rel="license" href="http://code.google.com/google_bsd_license.html">BSD Lic
ense</a>. | |
468 </p> | |
469 <p> | |
470 ©2011 Google | |
471 </p> | |
472 <!-- begin analytics --> | |
473 <script src="https://www.google-analytics.com/urchin.js" type="text/javascript">
</script> | |
474 <script src="https://www.google-analytics.com/ga.js" type="text/javascript"></sc
ript> | |
475 <script type="text/javascript"> | |
476 // chrome doc tracking | |
477 try { | |
478 var engdocs = _gat._getTracker("YT-10763712-2"); | |
479 engdocs._trackPageview(); | |
480 } catch(err) {} | |
481 // code.google.com site-wide tracking | |
482 try { | |
483 _uacct="UA-18071-1"; | |
484 _uanchor=1; | |
485 _uff=0; | |
486 urchinTracker(); | |
487 } | |
488 catch(e) {/* urchinTracker not available. */} | |
489 </script> | |
490 <!-- end analytics --> | |
491 </div> | |
492 </div> <!-- /gc-footer --> | |
493 </div> <!-- /gc-container --> | |
494 </body></html> | |
OLD | NEW |