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

Unified Diff: chrome/common/extensions/docs/examples/api/speechInput/basic/background.js

Issue 8698003: Adding CSP to Speech Input API sample. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: License. Created 9 years, 1 month 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/examples/api/speechInput/basic/background.js
diff --git a/chrome/common/extensions/docs/examples/api/speechInput/basic/background.html b/chrome/common/extensions/docs/examples/api/speechInput/basic/background.js
similarity index 76%
copy from chrome/common/extensions/docs/examples/api/speechInput/basic/background.html
copy to chrome/common/extensions/docs/examples/api/speechInput/basic/background.js
index 34e71518abb49119b81f74b2d771f5d6214de6d0..3093b6cdaede853e7d7202cc767c3a2e914cc87c 100644
--- a/chrome/common/extensions/docs/examples/api/speechInput/basic/background.html
+++ b/chrome/common/extensions/docs/examples/api/speechInput/basic/background.js
@@ -1,5 +1,7 @@
-<html>
-<script>
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
function setStartIcon() {
chrome.browserAction.setIcon({ path: "start.png" });
}
@@ -13,7 +15,8 @@ chrome.browserAction.onClicked.addListener(function(tab) {
if (!recording) {
chrome.experimental.speechInput.start({}, function() {
if (chrome.extension.lastError) {
- alert("Couldn't start speech input: " + chrome.extension.lastError.message);
+ alert("Couldn't start speech input: " +
+ chrome.extension.lastError.message);
setStartIcon();
} else {
setStopIcon();
@@ -36,5 +39,3 @@ chrome.experimental.speechInput.onResult.addListener(function(result) {
alert(result.hypotheses[0].utterance);
setStartIcon();
});
-</script>
-</html>

Powered by Google App Engine
This is Rietveld 408576698