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

Unified Diff: chrome/common/extensions/docs/templates/intros/experimental_speechInput.html

Issue 11745015: Update references to the extension messaging APIs to point to the "runtime" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/docs/templates/intros/experimental_speechInput.html
diff --git a/chrome/common/extensions/docs/templates/intros/experimental_speechInput.html b/chrome/common/extensions/docs/templates/intros/experimental_speechInput.html
index 9c9f994bfe86197437963e622d5e41d0013a97a9..1db1334bc3c2f7948e53b063d02c1e4695c6385a 100644
--- a/chrome/common/extensions/docs/templates/intros/experimental_speechInput.html
+++ b/chrome/common/extensions/docs/templates/intros/experimental_speechInput.html
@@ -22,13 +22,13 @@ For example:</p>
<h2 id="howToStart">How to start speech recognition</h2>
<p>To start recognizing speech an extension must call the <code>start()</code>
method. If provided, your callback will be called once recording has
-successfully started. In case of error <code>chrome.extension.lastError</code>
+successfully started. In case of error <code>chrome.runtime.lastError</code>
will be set.</p>
<p>This API provides exclusive access to the default recording device to the
first extension requesting it. Consequently, any calls to <code>start()</code>
when the device is being used by another extension or web page will fail and set
-<code>chrome.extension.lastError</code>. The message <code>requestDenied</code>
+<code>chrome.runtime.lastError</code>. The message <code>requestDenied</code>
will be set if another extension in the same profile is making use of the API.
Otherwise <code>noRecordingDeviceFound</code>, <code>recordingDeviceInUse</code>
or <code>unableToStart</code> will be set depending on the situation.</p>
@@ -71,7 +71,7 @@ It is safe to call <code>start()</code> again from the error callback.</p>
<h2 id="howToStop">How to stop recording</h2>
<p>To stop speech recognition call the <code>stop()</code> method. If provided,
the callback function will be called once recording has successfully stopped.
-In case of error <code>chrome.extension.lastError</code> will be set.
+In case of error <code>chrome.runtime.lastError</code> will be set.
</p>
@@ -90,8 +90,8 @@ continued period of silence).
most likely recognition result.</p>
<pre>
function checkStart() {
- if (chrome.extension.lastError) {
- alert("Couldn't start speech input: " + chrome.extension.lastError.message);
+ if (chrome.runtime.lastError) {
+ alert("Couldn't start speech input: " + chrome.runtime.lastError.message);
}
}
@@ -106,4 +106,4 @@ function recognitionSucceeded(result) {
chrome.experimental.speechInput.onError.addListener(recognitionFailed);
chrome.experimental.speechInput.onResult.addListener(recognitionSucceeded);
chrome.experimental.speechInput.start({ "language": "en" }, checkStart);
-</pre>
+</pre>

Powered by Google App Engine
This is Rietveld 408576698