summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/docs/static/api_index.html
blob: a597796a714696369b6904f313d5ca483827b72f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<div id="pageData-name" class="pageData">chrome.* APIs</div>
<div id="pageData-showTOC" class="pageData">true</div>

<p>
Google Chrome provides APIs such as
<code>chrome.bookmarks</code> and <code>chrome.tab</code>
so that extensions can interact with the browser.
</p>

<h2 id="supported">Supported APIs</h2>

<p>
Here are the supported chrome.* APIs:
</p>

<ul>
  <li><a href="bookmarks.html">bookmarks</a></li>
  <li><a href="browserAction.html">browserAction</a></li>
  <li><a href="extension.html">extension</a></li>
  <li><a href="i18n.html">i18n</a></li>
  <li><a href="pageAction.html">pageAction</a></li>
  <li><a href="tabs.html">tabs</a></li>
  <li><a href="windows.html">windows</a></li>
</ul>

<h2 id="experimental">Experimental APIs</h2>

<p>
We'd like your <a href="http://groups.google.com/a/chromium.org/group/chromium-extensions/topics">feedback</a>
on the following experimental APIs:
</p>

<ul>
  <li><a href="experimental.history.html">experimental.history</a></li>
  <li><a href="experimental.processes.html">experimental.processes</a></li>
</ul>

<p class="caution">
<b>Caution:</b>
Don't depend on these experimental APIs.
They might disappear,
and they <em>will</em> change.
Also, the extension gallery doesn't allow you to
upload extensions that use experimental APIs.
</p>

<p>
To use an experimental API, you must specify the "experimental"
<a href="manifest.html#permissions">permission</a>
in your extension's manifest, like this:
</p>

<pre>
"permissions": [
  <b>"experimental"</b>,
  ...
],
</pre>

<p>
You must also specify the <b>--enable-experimental-extension-apis</b> flag
when you launch the browser. On Windows, you can do this by modifying
the properties of the shortcut that you use to launch Google Chrome.
For example:
</p>

<pre>
<em>path_to_chrome.exe</em> <b>--enable-experimental-extension-apis</b></pre>

<h2 id="conventions">API conventions</h2>

<p>
Unless the doc says otherwise,
methods in the chrome.* APIs are asynchronous:
they return immediately,
without waiting for the operation to finish.
If you need to know the outcome of an operation,
then you pass a callback function into the method.
For more information, see the video
<a href="http://www.youtube.com/watch?v=bmxr75CV36A&feature=PlayList&p=CA101D6A85FE9D4B&index=2">Extension API Design</a>.
</p>