| 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> |
| 11 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | 11 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| 12 <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css"> | 12 <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css"> |
| 13 <link href="css/print.css" rel="stylesheet" type="text/css" media="print"> | 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"> | 14 <script type="text/javascript" src="../../../third_party/jstemplate/jstempla
te_compiled.js"> |
| 15 </script> | 15 </script> |
| 16 <script type="text/javascript" src="../../../../third_party/json_minify/mini
fy-sans-regexp.js"> | 16 <script type="text/javascript" src="../../../../third_party/json_minify/mini
fy-sans-regexp.js"> |
| 17 </script> | 17 </script> |
| 18 <script type="text/javascript" src="js/api_page_generator.js"></script> | 18 <script type="text/javascript" src="js/api_page_generator.js"></script> |
| 19 <script type="text/javascript" src="js/bootstrap.js"></script> | 19 <script type="text/javascript" src="js/bootstrap.js"></script> |
| 20 <script type="text/javascript" src="js/sidebar.js"></script> | 20 <script type="text/javascript" src="js/sidebar.js"></script> |
| 21 <title>chrome.experimental.* APIs - Google Chrome Extensions - Google Code</ti
tle></head> | 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"> | 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. | 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> | 24 </div> |
| 25 <div id="branchWarning" class="displayModeWarning"> | 25 <div id="branchWarning" class="displayModeWarning"> |
| 26 <span>WARNING: This is the <span id="branchName">BETA</span> documentation. | 26 <span>WARNING: This is the <span id="branchName">BETA</span> documentation. |
| 27 It may not work with the stable release of Chrome.</span> | 27 It may not work with the stable release of Chrome.</span> |
| 28 <select id="branchChooser"> | 28 <select id="branchChooser"> |
| 29 <option>Choose a different version... | 29 <option>Choose a different version... |
| 30 </option><option value="">Stable | 30 </option><option value="">Stable |
| 31 </option><option value="beta">Beta | 31 </option><option value="beta">Beta |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 <li><a href="themes.html">Themes</a></li> | 178 <li><a href="themes.html">Themes</a></li> |
| 179 </ul> | 179 </ul> |
| 180 </li> | 180 </li> |
| 181 </ul> | 181 </ul> |
| 182 </div> | 182 </div> |
| 183 <script> | 183 <script> |
| 184 initToggles(); | 184 initToggles(); |
| 185 </script> | 185 </script> |
| 186 <div class="g-unit" id="gc-pagecontent"> | 186 <div class="g-unit" id="gc-pagecontent"> |
| 187 <div id="pageTitle"> | 187 <div id="pageTitle"> |
| 188 <h1 class="page_title">chrome.experimental.* APIs</h1> | 188 <h1 class="page_title">Experimental Discovery APIs</h1> |
| 189 </div> | 189 </div> |
| 190 <!-- TABLE OF CONTENTS --> | 190 <!-- TABLE OF CONTENTS --> |
| 191 <div id="toc"> | 191 <div id="toc"> |
| 192 <h2>Contents</h2> | 192 <h2>Contents</h2> |
| 193 <ol> | 193 <ol> |
| 194 <li> | 194 <li> |
| 195 <a href="#overview"> | 195 <a href="#apiReference">API reference: chrome.experimental.disco
very</a> |
| 196 List of APIs | 196 <ol> |
| 197 </a> | 197 <li> |
| 198 <ol> | 198 <a href="#global-methods">Methods</a> |
| 199 </ol> | 199 <ol> |
| 200 </li><li> | 200 <li> |
| 201 <a href="#using">How to use experimental APIs</a> | 201 <a href="#method-clearAllSuggestions">clearAllSuggestions</a> |
| 202 <ol> | 202 </li><li> |
| 203 </ol> | 203 <a href="#method-clearSuggestion">clearSuggestion</a> |
| 204 </li><li> | 204 </li><li> |
| 205 <a href="#other">More APIs</a> | 205 <a href="#method-suggest">suggest</a> |
| 206 <ol> | 206 </li> |
| 207 </ol> | 207 </ol> |
| 208 </li> | 208 </li> |
| 209 </ol> |
| 210 </li> |
| 209 </ol> | 211 </ol> |
| 210 </div> | 212 </div> |
| 211 <!-- /TABLE OF CONTENTS --> | 213 <!-- /TABLE OF CONTENTS --> |
| 212 <!-- Standard content lead-in for experimental API pages --> | 214 <!-- Standard content lead-in for experimental API pages --> |
| 213 <!-- STATIC CONTENT PLACEHOLDER --> | 215 <!-- STATIC CONTENT PLACEHOLDER --> |
| 214 <div id="static"><div id="pageData-name" class="pageData">chrome.experim
ental.* APIs</div> | 216 <div id="static"><div id="pageData-name" class="pageData">Experimental D
iscovery APIs</div> |
| 215 <div id="pageData-showTOC" class="pageData">true</div> | 217 <!-- BEGIN AUTHORED CONTENT --> |
| 216 <p> | 218 <p>The current methods allow extensions to inject suggested links in the recomme
nded pane of the New Tab Page.</p> |
| 217 Before you start, <strong>choose the right version of this page.</strong> | 219 <!-- END AUTHORED CONTENT --> |
| 218 You should read either: | |
| 219 </p> | |
| 220 <ul> | |
| 221 <li> <a href="http://code.google.com/chrome/extensions/trunk/experimental.html
">Most recent experimental APIs</a> | |
| 222 </li><li> <a href="http://code.google.com/chrome/extensions/dev/experimental.h
tml">Dev channel experimental APIs</a></li> | |
| 223 </ul> | |
| 224 <p> | |
| 225 For information about browser versions such as | |
| 226 Canary (bleeding edge) and the Dev channel, see | |
| 227 <a href="http://www.chromium.org/getting-involved/dev-channel">Chrome Release Ch
annels</a>. | |
| 228 For details about channel-specific docs, | |
| 229 see <a href="docs.html#versions">Doc versions</a>. | |
| 230 </p> | |
| 231 <h2 id="overview"> | |
| 232 List of APIs | |
| 233 </h2> | |
| 234 <p> | |
| 235 We'd like your <a href="http://groups.google.com/a/chromium.org/group/chromium-e
xtensions/topics">feedback</a> | |
| 236 on the following experimental APIs: | |
| 237 </p> | |
| 238 <ul> | |
| 239 <li> | |
| 240 <a href="experimental.app.html">experimental.app</a></li><li> | |
| 241 <a href="experimental.devtools.audits.html">experimental.devtools.audits</a></
li><li> | |
| 242 <a href="experimental.devtools.console.html">experimental.devtools.console</a>
</li><li> | |
| 243 <a href="experimental.downloads.html">experimental.downloads</a></li><li> | |
| 244 <a href="experimental.fontSettings.html">experimental.fontSettings</a></li><li
> | |
| 245 <a href="experimental.infobars.html">experimental.infobars</a></li><li> | |
| 246 <a href="experimental.input.ime.html">experimental.input.ime</a></li><li> | |
| 247 <a href="experimental.keybinding.html">experimental.keybinding</a></li><li> | |
| 248 <a href="experimental.offscreenTabs.html">experimental.offscreenTabs</a></li><
li> | |
| 249 <a href="experimental.runtime.html">experimental.runtime</a></li><li> | |
| 250 <a href="experimental.speechInput.html">experimental.speechInput</a></li> | |
| 251 </ul> | |
| 252 <p> | |
| 253 Pay special attention to the following APIs, | |
| 254 which we expect to finalize soon: | |
| 255 <b>devtools</b>, | |
| 256 <b>infobars</b>, | |
| 257 <b>permissions</b>, | |
| 258 For examples of using the experimental APIs, see | |
| 259 <a href="samples.html#experimental">Samples</a>. | |
| 260 </p> | |
| 261 <p class="warning"> | |
| 262 <b>Caution:</b> | |
| 263 Don't depend on these experimental APIs. | |
| 264 They might disappear, | |
| 265 and they <em>will</em> change. | |
| 266 Also, the Chrome Web Store doesn't allow you to | |
| 267 upload extensions that use experimental APIs. | |
| 268 </p> | |
| 269 <h2 id="using">How to use experimental APIs</h2> | |
| 270 <ol> | |
| 271 <li> | |
| 272 Make sure you're using either | |
| 273 <a href="http://tools.google.com/dlpage/chromesxs">Canary</a> | |
| 274 (which you can use at the same time as other Chrome channels) or the | |
| 275 <a href="http://www.chromium.org/getting-involved/dev-channel">Dev channel</a>. | |
| 276 Although the experimental APIs might work in other versions, | |
| 277 we need your feedback on the latest incarnation of the APIs, | |
| 278 which you can find in Canary and on the Dev channel. | |
| 279 </li> | |
| 280 <li> | |
| 281 Using either the | |
| 282 <a href="http://code.google.com/chrome/extensions/trunk/experimental.html">m
ost recent API documentation</a> (if you're using Canary) or the | |
| 283 <a href="http://code.google.com/chrome/extensions/dev/experimental.html">API
documentation for the Dev channel</a>, | |
| 284 write the code for your extension. | |
| 285 </li> | |
| 286 <li> | |
| 287 Specify the "experimental" | |
| 288 <a href="manifest.html#permissions">permission</a> | |
| 289 in your extension's manifest, like this: | |
| 290 <pre>"permissions": [ | |
| 291 <b>"experimental"</b>, | |
| 292 ... | |
| 293 ], | |
| 294 </pre> | |
| 295 </li> | |
| 296 <li> | |
| 297 Enable the experimental API in your browser. | |
| 298 You can do this in either of two ways: | |
| 299 <ul> | |
| 300 <li> Go to <b>chrome://flags</b>, | |
| 301 find "Experimental Extension APIs", | |
| 302 click its "Enable" link, | |
| 303 and restart Chrome. | |
| 304 From now on, | |
| 305 unless you return to that page and disable experimental APIs, | |
| 306 you'll be able to run extensions that use experimental APIs. | |
| 307 </li> | |
| 308 <li> Specify the <b>--enable-experimental-extension-apis</b> flag | |
| 309 each time you launch the browser. | |
| 310 On Windows, you can do this by modifying | |
| 311 the properties of the shortcut that you use to launch Google Chrome. | |
| 312 For example: | |
| 313 <pre><em>path_to_chrome.exe</em> <b>--enable-experimental-extension-apis</b></pr
e> | |
| 314 </li> | |
| 315 </ul> | |
| 316 </li> | |
| 317 <li> | |
| 318 <a href="http://groups.google.com/a/chromium.org/group/chromium-extensions/t
opics">Give us feedback!</a> | |
| 319 Your comments and suggestions help us | |
| 320 improve the APIs and decide | |
| 321 which ones should move from experimental to supported. | |
| 322 </li> | |
| 323 </ol> | |
| 324 <h2 id="other">More APIs</h2> | |
| 325 <p> | |
| 326 For information on the standard APIs that extensions can use, see | |
| 327 <a href="api_index.html">chrome.* APIs</a> and | |
| 328 <a href="api_other.html">Other APIs</a>. | |
| 329 </p> | |
| 330 </div> | 220 </div> |
| 331 <!-- API PAGE --> | 221 <!-- API PAGE --> |
| 332 <!-- /apiPage --> | 222 <div class="apiPage"> |
| 223 <a name="apiReference"></a> |
| 224 <h2>API reference: chrome.experimental.discovery</h2> |
| 225 <!-- PROPERTIES --> |
| 226 <!-- /apiGroup --> |
| 227 <!-- METHODS --> |
| 228 <div id="methodsTemplate" class="apiGroup"> |
| 229 <a name="global-methods"></a> |
| 230 <h3>Methods</h3> |
| 231 <!-- iterates over all functions --> |
| 232 <div class="apiItem"> |
| 233 <a name="method-clearAllSuggestions"></a> <!-- method-anchor --> |
| 234 <h4>clearAllSuggestions</h4> |
| 235 <div class="summary"> |
| 236 <!-- Note: intentionally longer 80 columns --> |
| 237 <span>chrome.experimental.discovery.clearAllSuggestions</span>
()</div> |
| 238 <div class="description"> |
| 239 <p>Clear all URLs that were previously suggested for discovery.<
/p> |
| 240 <!-- PARAMETERS --> |
| 241 <dl> |
| 242 </dl> |
| 243 <!-- RETURNS --> |
| 244 <dl> |
| 245 </dl> |
| 246 <!-- CALLBACK --> |
| 247 <!-- MIN_VERSION --> |
| 248 </div> <!-- /description --> |
| 249 </div><div class="apiItem"> |
| 250 <a name="method-clearSuggestion"></a> <!-- method-anchor --> |
| 251 <h4>clearSuggestion</h4> |
| 252 <div class="summary"> |
| 253 <!-- Note: intentionally longer 80 columns --> |
| 254 <span>chrome.experimental.discovery.clearSuggestion</span>(<sp
an class="null"><span>string</span> |
| 255 <var><span>linkUrl</span></var></span>)</div> |
| 256 <div class="description"> |
| 257 <p>Clear a URL that was previously suggested for discovery.</p> |
| 258 <!-- PARAMETERS --> |
| 259 <h4>Parameters</h4> |
| 260 <dl> |
| 261 <div> |
| 262 <div> |
| 263 <dt> |
| 264 <var>linkUrl</var> |
| 265 <em> |
| 266 <!-- TYPE --> |
| 267 <div style="display:inline"> |
| 268 ( |
| 269 <span id="typeTemplate"> |
| 270 <span> |
| 271 <span>string</span> |
| 272 </span> |
| 273 </span> |
| 274 ) |
| 275 </div> |
| 276 </em> |
| 277 </dt> |
| 278 <dd>The URL to remove from discovery. Must be exactly the same as a UR
L previously used on a call to <a href="experimental.discovery.html#method-sugge
st"><var>plugins</var></a>.</dd> |
| 279 <!-- OBJECT PROPERTIES --> |
| 280 <!-- OBJECT METHODS --> |
| 281 <!-- OBJECT EVENT FIELDS --> |
| 282 <!-- FUNCTION PARAMETERS --> |
| 283 </div> |
| 284 </div> |
| 285 </dl> |
| 286 <!-- RETURNS --> |
| 287 <dl> |
| 288 </dl> |
| 289 <!-- CALLBACK --> |
| 290 <!-- MIN_VERSION --> |
| 291 </div> <!-- /description --> |
| 292 </div><div class="apiItem"> |
| 293 <a name="method-suggest"></a> <!-- method-anchor --> |
| 294 <h4>suggest</h4> |
| 295 <div class="summary"> |
| 296 <!-- Note: intentionally longer 80 columns --> |
| 297 <span>chrome.experimental.discovery.suggest</span>(<span class
="null"><span>object</span> |
| 298 <var><span>details</span></var></span>)</div> |
| 299 <div class="description"> |
| 300 <p>Suggests a URL for discovery.</p> |
| 301 <!-- PARAMETERS --> |
| 302 <h4>Parameters</h4> |
| 303 <dl> |
| 304 <div> |
| 305 <div> |
| 306 <dt> |
| 307 <var>details</var> |
| 308 <em> |
| 309 <!-- TYPE --> |
| 310 <div style="display:inline"> |
| 311 ( |
| 312 <span id="typeTemplate"> |
| 313 <span> |
| 314 <span>object</span> |
| 315 </span> |
| 316 </span> |
| 317 ) |
| 318 </div> |
| 319 </em> |
| 320 </dt> |
| 321 <dd class="todo"> |
| 322 Undocumented. |
| 323 </dd> |
| 324 <!-- OBJECT PROPERTIES --> |
| 325 <dd> |
| 326 <dl> |
| 327 <div> |
| 328 <div> |
| 329 <dt> |
| 330 <var>linkUrl</var> |
| 331 <em> |
| 332 <!-- TYPE --> |
| 333 <div style="display:inline"> |
| 334 ( |
| 335 <span id="typeTemplate"> |
| 336 <span> |
| 337 <span>string</span> |
| 338 </span> |
| 339 </span> |
| 340 ) |
| 341 </div> |
| 342 </em> |
| 343 </dt> |
| 344 <dd>The URL to suggest and that will be displayed in the new tab page
under the recommended pane.</dd> |
| 345 <!-- OBJECT PROPERTIES --> |
| 346 <!-- OBJECT METHODS --> |
| 347 <!-- OBJECT EVENT FIELDS --> |
| 348 <!-- FUNCTION PARAMETERS --> |
| 349 </div> |
| 350 </div><div> |
| 351 <div> |
| 352 <dt> |
| 353 <var>linkText</var> |
| 354 <em> |
| 355 <!-- TYPE --> |
| 356 <div style="display:inline"> |
| 357 ( |
| 358 <span id="typeTemplate"> |
| 359 <span> |
| 360 <span>string</span> |
| 361 </span> |
| 362 </span> |
| 363 ) |
| 364 </div> |
| 365 </em> |
| 366 </dt> |
| 367 <dd>The linkified text. It should be relatively short.</dd> |
| 368 <!-- OBJECT PROPERTIES --> |
| 369 <!-- OBJECT METHODS --> |
| 370 <!-- OBJECT EVENT FIELDS --> |
| 371 <!-- FUNCTION PARAMETERS --> |
| 372 </div> |
| 373 </div><div> |
| 374 <div> |
| 375 <dt> |
| 376 <var>score</var> |
| 377 <em> |
| 378 <!-- TYPE --> |
| 379 <div style="display:inline"> |
| 380 ( |
| 381 <span class="optional">optional</span> |
| 382 <span id="typeTemplate"> |
| 383 <span> |
| 384 <span>number</span> |
| 385 </span> |
| 386 </span> |
| 387 ) |
| 388 </div> |
| 389 </em> |
| 390 </dt> |
| 391 <dd>A score indicating how interesting that suggestion is. A score of
2 is twice as likely to be displayed than a score of 1. Defaults to 1.</dd> |
| 392 <!-- OBJECT PROPERTIES --> |
| 393 <!-- OBJECT METHODS --> |
| 394 <!-- OBJECT EVENT FIELDS --> |
| 395 <!-- FUNCTION PARAMETERS --> |
| 396 </div> |
| 397 </div> |
| 398 </dl> |
| 399 </dd> |
| 400 <!-- OBJECT METHODS --> |
| 401 <!-- OBJECT EVENT FIELDS --> |
| 402 <!-- FUNCTION PARAMETERS --> |
| 403 </div> |
| 404 </div> |
| 405 </dl> |
| 406 <!-- RETURNS --> |
| 407 <dl> |
| 408 </dl> |
| 409 <!-- CALLBACK --> |
| 410 <!-- MIN_VERSION --> |
| 411 </div> <!-- /description --> |
| 412 </div> <!-- /apiItem --> |
| 413 </div> <!-- /apiGroup --> |
| 414 <!-- EVENTS --> |
| 415 <!-- /apiGroup --> |
| 416 <!-- TYPES --> |
| 417 <!-- /apiGroup --> |
| 418 </div> <!-- /apiPage --> |
| 333 </div> <!-- /gc-pagecontent --> | 419 </div> <!-- /gc-pagecontent --> |
| 334 </div> <!-- /g-section --> | 420 </div> <!-- /g-section --> |
| 335 </div> <!-- /codesiteContent --> | 421 </div> <!-- /codesiteContent --> |
| 336 <div id="gc-footer" --=""> | 422 <div id="gc-footer" --=""> |
| 337 <div class="text"> | 423 <div class="text"> |
| 338 <p> | 424 <p> |
| 339 Except as otherwise <a href="http://code.google.com/policies.html#restrictions
">noted</a>, | 425 Except as otherwise <a href="http://code.google.com/policies.html#restrictions
">noted</a>, |
| 340 the content of this page is licensed under the <a rel="license" href="http://c
reativecommons.org/licenses/by/3.0/">Creative Commons | 426 the content of this page is licensed under the <a rel="license" href="http://c
reativecommons.org/licenses/by/3.0/">Creative Commons |
| 341 Attribution 3.0 License</a>, and code samples are licensed under the | 427 Attribution 3.0 License</a>, and code samples are licensed under the |
| 342 <a rel="license" href="http://code.google.com/google_bsd_license.html">BSD Lic
ense</a>. | 428 <a rel="license" href="http://code.google.com/google_bsd_license.html">BSD Lic
ense</a>. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 360 _uff=0; | 446 _uff=0; |
| 361 urchinTracker(); | 447 urchinTracker(); |
| 362 } | 448 } |
| 363 catch(e) {/* urchinTracker not available. */} | 449 catch(e) {/* urchinTracker not available. */} |
| 364 </script> | 450 </script> |
| 365 <!-- end analytics --> | 451 <!-- end analytics --> |
| 366 </div> | 452 </div> |
| 367 </div> <!-- /gc-footer --> | 453 </div> <!-- /gc-footer --> |
| 368 </div> <!-- /gc-container --> | 454 </div> <!-- /gc-container --> |
| 369 </body></html> | 455 </body></html> |
| OLD | NEW |