summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/docs/static
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/common/extensions/docs/static')
-rw-r--r--chrome/common/extensions/docs/static/browserAction.html5
-rw-r--r--chrome/common/extensions/docs/static/experimental.tts.html146
-rw-r--r--chrome/common/extensions/docs/static/getstarted.html1
-rw-r--r--chrome/common/extensions/docs/static/i18n.html2
-rw-r--r--chrome/common/extensions/docs/static/override.html5
-rw-r--r--chrome/common/extensions/docs/static/pageAction.html15
-rw-r--r--chrome/common/extensions/docs/static/permission_warnings.html28
-rw-r--r--chrome/common/extensions/docs/static/themes.html8
-rw-r--r--chrome/common/extensions/docs/static/tut_debugging.html2
9 files changed, 180 insertions, 32 deletions
diff --git a/chrome/common/extensions/docs/static/browserAction.html b/chrome/common/extensions/docs/static/browserAction.html
index 40da968..dbc3a53 100644
--- a/chrome/common/extensions/docs/static/browserAction.html
+++ b/chrome/common/extensions/docs/static/browserAction.html
@@ -47,7 +47,7 @@ like this:
"name": "My extension",
...
<b>"browser_action": {
- "default_icon": "images/icon19.png", <em>// <b>required</b></em>
+ "default_icon": "images/icon19.png", <em>// optional</em>
"default_title": "Google Mail", <em>// optional; shown in tooltip</em>
"default_popup": "popup.html" <em>// optional</em>
}</b>,
@@ -57,8 +57,7 @@ like this:
<h2 id="ui">Parts of the UI</h2>
<p>
-A browser action must have an <a href="#icon">icon</a>.
-It can also have
+A browser action can have an <a href="#icon">icon</a>,
a <a href="#tooltip">tooltip</a>,
a <a href="#badge">badge</a>,
and a <a href="#popups">popup</a>.
diff --git a/chrome/common/extensions/docs/static/experimental.tts.html b/chrome/common/extensions/docs/static/experimental.tts.html
new file mode 100644
index 0000000..fb2a772
--- /dev/null
+++ b/chrome/common/extensions/docs/static/experimental.tts.html
@@ -0,0 +1,146 @@
+<p id="classSummary">
+Use the <code>chrome.experimental.tts</code> module to play synthesized
+text-to-speech (TTS) from your extension or packaged app, or to register
+as a speech provider for other extensions and packaged apps that want to speak.
+</p>
+
+<p class="note"><b>Give us feedback:</b> If you have suggestions,
+especially changes that should be made before stabilizing the first
+version of this API, please send your ideas to the
+<a href="http://groups.google.com/a/chromium.org/group/chromium-extensions">chromium-extensions</a>
+group.</p>
+
+<h2 id="overview">Overview</h2>
+
+<p>To enable this experimental API, visit
+<b>chrome://flags</b> and enable <b>Experimental Extension APIs</b>.
+
+<p>Chrome provides native support for speech on Windows (using SAPI
+5), Mac OS X, and Chrome OS, using speech synthesis capabilities
+provided by the operating system. On all platforms, the user can
+install extensions that register themselves as alternative speech
+synthesis providers.</p>
+
+<h2 id="generating_speech">Generating speech</h2>
+
+<p>Call <code>speak()</code> from your extension or
+packaged app to speak. For example:</p>
+
+<pre>chrome.experimental.tts.speak('Hello, world.');</pre>
+
+<p>You can provide options that control various properties of the speech,
+such as its rate, pitch, and more. For example:</p>
+
+<pre>chrome.experimental.tts.speak('Hello, world.', {'rate': 0.8});</pre>
+
+<p>It's also a good idea to specify the locale so that a synthesizer
+supporting that language (and regional dialect, if applicable) is chosen.</p>
+
+<pre>chrome.experimental.tts.speak(
+ 'Hello, world.',
+ {
+ 'locale': 'en-US',
+ 'rate': 0.8
+ });</pre>
+
+<p>Not all speech engines will support all options.</p>
+
+<p>You can also pass a callback function that will be called when the
+speech has finished. For example, suppose we have an image on our page
+displaying a picture of a face with a closed mouth. We could open the mouth
+while speaking, and close it when done.</p>
+
+<pre>faceImage.src = 'open_mouth.png';
+chrome.experimental.tts.speak(
+ 'Hello, world.', null, function() {
+ faceImage.src = 'closed_mouth.png';
+ });
+</pre>
+
+<p>To stop speaking immediately, just call <code>stop()</code>. Call
+<code>isSpeaking()</code> to find out if a TTS engine is currently speaking.</p>
+
+<p>You can check to see if an error occurred by checking
+<code>chrome.extension.lastError</code> inside the callback function.</p>
+
+<h2 id="ssml">SSML markup</h2>
+
+<p>Utterances used in this API may include markup using the
+<a href="http://www.w3.org/TR/speech-synthesis">Speech Synthesis Markup
+Language (SSML)</a>. For example:
+
+<pre>chrome.experimental.tts.speak('The &lt;emphasis&gt;second&lt;/emphasis&gt; word of this sentence was emphasized.');</pre>
+
+<p>Not all speech engines will support all SSML tags, and some may not support
+SSML at all, but all engines are expected to ignore any SSML they don't
+support and still speak the underlying text.</p>
+
+<h2 id="provider">Implementing a speech provider</h2>
+
+<p>An extension can register itself as a speech provider. By doing so, it
+can intercept some or all calls to functions such as
+<code>speak()</code> and <code>stop()</code> and provide an alternate
+implementation. Extensions are free to use any available web technology
+to provide speech, including streaming audio from a server, HTML5 audio,
+Native Client, or Flash. An extension could even do something different
+with the utterances, like display closed captions in a pop-up window or
+send them as log messages to a remote server.</p>
+
+<p>To provide TTS, an extension must first declare all voices it provides
+in the extension manifest, like this:</p>
+
+<pre>{
+ "name": "My TTS Provider",
+ "version": "1.0",
+ <b>"permissions": ["experimental"]
+ "tts": {
+ "voices": [
+ {
+ "voiceName": "Alice",
+ "locale": "en-US",
+ "gender": "female"
+ },
+ {
+ "voiceName": "Pat",
+ "locale": "en-US"
+ }
+ ]
+ },</b>
+ "background_page": "background.html",
+}</pre>
+
+<p>An extension can specify any number of voices. The three
+parameters&mdash;<code>voiceName</code>, <code>locale</code>,
+and <code>gender</code>&mdash;are all optional. If they are all unspecified,
+the extension will handle all speech from all clients. If any of them
+are specified, they can be used to filter speech requests. For
+example, if a voice only supports French, it should set the locale to
+'fr' (or something more specific like 'fr-FR') so that only utterances
+in that locale are routed to that extension.</p>
+
+<p>To handle speech calls, the extension should register listeners
+for <code>onSpeak</code> and <code>onStop</code>, like this:</p>
+
+<pre>var speakListener = function(utterance, options, callback) {
+ ...
+ callback();
+};
+var stopListener = function() {
+ ...
+};
+chrome.experimental.tts.onSpeak.addListener(speakListener);
+chrome.experimental.tts.onStop.addListener(stopListener);</pre>
+
+<p class="warning"><b>Important:</b> Don't forget to call the callback
+function from your speak listener!</p>
+
+<p>If an extension does not register listeners for both
+<code>onSpeak</code> and <code>onStop</code>, it will not intercept any
+speech calls, regardless of what is in the manifest.
+
+<p>The decision of whether or not to send a given speech request to an
+extension is based solely on whether the extension supports the given voice
+parameters in its manifest and has registered listeners
+for <code>onSpeak</code> and <code>onStop</code>. In other words,
+there's no way for an extension to receive a speech request and
+dynamically decide whether to handle it or not.</p>
diff --git a/chrome/common/extensions/docs/static/getstarted.html b/chrome/common/extensions/docs/static/getstarted.html
index 1121b58..f1ec273 100644
--- a/chrome/common/extensions/docs/static/getstarted.html
+++ b/chrome/common/extensions/docs/static/getstarted.html
@@ -65,7 +65,6 @@ to the toolbar of Google Chrome.
<img src="images/toolsmenu.gif" width="29" height="29" alt=""
style="margin-top:0" />
and choosing <b>Tools > Extensions</b>.
- (On Mac, use <b>Window > Extensions</b>.)
</li>
<li>
diff --git a/chrome/common/extensions/docs/static/i18n.html b/chrome/common/extensions/docs/static/i18n.html
index 4d0f9b3..abe5c9e 100644
--- a/chrome/common/extensions/docs/static/i18n.html
+++ b/chrome/common/extensions/docs/static/i18n.html
@@ -265,7 +265,7 @@ Here's an example of using <code>@@bidi_*</code> messages in a CSS file:
<pre>
body {
- <b>dir: __MSG_@@bidi_dir__;</b>
+ <b>direction: __MSG_@@bidi_dir__;</b>
}
div#header {
diff --git a/chrome/common/extensions/docs/static/override.html b/chrome/common/extensions/docs/static/override.html
index 6a4848d..83bbd5d 100644
--- a/chrome/common/extensions/docs/static/override.html
+++ b/chrome/common/extensions/docs/static/override.html
@@ -70,6 +70,11 @@ specify "spanning" mode for the <a href="manifest.html#incognito">incognito</a>
manifest property.
</p>
+<p class="note">
+<b>Note:</b>
+You cannot override the New Tab page in incognito windows.
+</p>
+
<p>
The following screenshots show the default New Tab page
next to a custom New Tab page.
diff --git a/chrome/common/extensions/docs/static/pageAction.html b/chrome/common/extensions/docs/static/pageAction.html
index 3def87e..0ca6fea 100644
--- a/chrome/common/extensions/docs/static/pageAction.html
+++ b/chrome/common/extensions/docs/static/pageAction.html
@@ -46,7 +46,7 @@ like this:
"name": "My extension",
...
<b>"page_action": {
- "default_icon": "icons/foo.png", <em>// <b>required</b></em>
+ "default_icon": "icons/foo.png", <em>// optional</em>
"default_title": "Do action", <em>// optional; shown in tooltip</em>
"default_popup": "popup.html" <em>// optional</em>
}</b>,
@@ -57,8 +57,8 @@ like this:
<p>
Like browser actions,
-page actions have an icon and
-can also have a tooltip and popup;
+page actions can have an icon,
+a tooltip, and popup;
they can't have badges, however.
In addition, page actions can appear and disappear.
You can find information about icons, tooltips, and popups
@@ -95,15 +95,6 @@ follow these guidelines:</p>
for features that make sense
for most pages.
Use <a href="browserAction.html">browser actions</a> instead.
- <li><b>Do</b> use icons
- that are slightly lighter weight
- than <a href="browserAction.html#icon">browser action icons</a>.
- Most icons that Chrome displays
- in the location bar
- are smaller than 19 pixels.
- If the edge pixels are used,
- they are usually only used
- for a faint shadow.
<li><b>Don't</b> constantly animate your icon.
That's just annoying.
</ul>
diff --git a/chrome/common/extensions/docs/static/permission_warnings.html b/chrome/common/extensions/docs/static/permission_warnings.html
index 4671f58..b70280f 100644
--- a/chrome/common/extensions/docs/static/permission_warnings.html
+++ b/chrome/common/extensions/docs/static/permission_warnings.html
@@ -109,7 +109,7 @@ brings up the following warning:
<p>
It can be surprising when adding a permission such as "tabs"
results in the seemingly unrelated warning
-that the extension can access your browsing history.
+that the extension can access your browsing activity.
The reason for the warning is that
although the <code>chrome.tabs</code> API
might be used only to open new tabs,
@@ -174,22 +174,30 @@ that trigger them.
</td>
<td>
<!-- HasEffectiveBrowsingHistoryPermission -->
- "history" or "tabs" permission
+ "history" permission
</td>
<td>
<p>
- The "tabs" permission is required by the
- <a href="tabs.html"><code>chrome.tabs</code></a> and
- <a href="windows.html"><code>chrome.windows</code></a> modules.
- </p>
- <p>
The "history" permission is required by
<a href="history.html"><code>chrome.history</code></a>.
</p>
+ </td>
+</tr>
+
+<tr>
+ <td style="font-weight:bold">
+ <!-- IDS_EXTENSION_PROMPT_WARNING_TABS -->
+ Your tabs and browsing activity
+ </td>
+ <td>
+ <!-- HasEffectiveBrowsingHistoryPermission -->
+ "tabs" permission
+ </td>
+ <td>
<p>
- Adding "tabs" to an existing extension
- that already has "history", or vice versa,
- doesn't cause a warning when the extension is autoupdated.
+ The "tabs" permission is required by the
+ <a href="tabs.html"><code>chrome.tabs</code></a> and
+ <a href="windows.html"><code>chrome.windows</code></a> modules.
</p>
</td>
</tr>
diff --git a/chrome/common/extensions/docs/static/themes.html b/chrome/common/extensions/docs/static/themes.html
index 0d04779..651a74d 100644
--- a/chrome/common/extensions/docs/static/themes.html
+++ b/chrome/common/extensions/docs/static/themes.html
@@ -66,7 +66,7 @@ file for a theme:
Colors are in RGB format.
To find the strings you can use within the "colors" field,
look for kColor* strings in
-<a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/browser_theme_provider.cc"><code>browser_theme_provider.cc</code></a>.
+<a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/themes/browser_theme_provider.cc"><code>browser_theme_provider.cc</code></a>.
</p>
<h3 id="images">images</h3>
@@ -75,7 +75,7 @@ look for kColor* strings in
Image resources use paths relative to the root of the extension.
You can override any of the images that are specified by
<code>kThemeableImages</code> in
-<a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/browser_theme_provider.cc"><code>browser_theme_provider.cc</code></a>.
+<a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/themes/browser_theme_provider.cc"><code>browser_theme_provider.cc</code></a>.
Just remove the "IDR_"
and convert the remaining characters to lowercase.
For example, <code>IDR_THEME_NTP_BACKGROUND</code>
@@ -92,7 +92,7 @@ properties such as background alignment,
background repeat,
and an alternate logo.
To see the properties and the values they can have, see
-<a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/browser_theme_provider.cc"><code>browser_theme_provider.cc</code></a>.
+<a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/themes/browser_theme_provider.cc"><code>browser_theme_provider.cc</code></a>.
<!-- [PENDING: We should flesh this out.] -->
</p>
@@ -106,7 +106,7 @@ because images don't work across platforms
and are brittle in the case of adding new buttons.
To find the strings you can use within the "tints" field,
look for kTint* strings in
-<a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/browser_theme_provider.cc"><code>browser_theme_provider.cc</code></a>.
+<a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/themes/browser_theme_provider.cc"><code>browser_theme_provider.cc</code></a>.
</p>
<p>
diff --git a/chrome/common/extensions/docs/static/tut_debugging.html b/chrome/common/extensions/docs/static/tut_debugging.html
index 20d46c5..7713e90 100644
--- a/chrome/common/extensions/docs/static/tut_debugging.html
+++ b/chrome/common/extensions/docs/static/tut_debugging.html
@@ -38,7 +38,7 @@ in the Extensions page.
find the extension files and load them.
If you don't have a handy copy of the files,
extract them from this
- <a href="examples/tutorials/getstarted/getstarted.zip">ZIP file</a>.
+ <a href="examples/tutorials/getstarted.zip">ZIP file</a>.
See Getting Started if you need
<a href="getstarted.html#load-ext">instructions
for loading the extension</a>.