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

Unified Diff: chrome/common/extensions/docs/examples/api/omnibox/background.html

Issue 2078021: First pass at experimental omnibox API. There are plenty of rough edges and (Closed)
Patch Set: no prefer_keyword Created 10 years, 7 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/examples/api/omnibox/background.html
diff --git a/chrome/common/extensions/docs/examples/api/omnibox/background.html b/chrome/common/extensions/docs/examples/api/omnibox/background.html
new file mode 100644
index 0000000000000000000000000000000000000000..ff83ff2ff8a32404146fbc73a7dce0efc07bee27
--- /dev/null
+++ b/chrome/common/extensions/docs/examples/api/omnibox/background.html
@@ -0,0 +1,19 @@
+<script>
+// This event is fired each time the user updates the text in the omnibox,
+// as long as the extension's keyword mode is still active.
+chrome.experimental.omnibox.onInputChanged.addListener(
+ function(text, suggest) {
+ console.log('inputChanged: ' + text);
+ suggest([
+ {content: text + " one", description: "the first one"},
+ {content: text + " number two", description: "the second entry"}
+ ]);
+ });
+
+// This event is fired with the user accepts the input in the omnibox.
+chrome.experimental.omnibox.onInputEntered.addListener(
+ function(text) {
+ console.log('inputEntered: ' + text);
+ alert('You just typed "' + text + '"');
+ });
+</script>
« no previous file with comments | « chrome/common/extensions/api/extension_api.json ('k') | chrome/common/extensions/docs/examples/api/omnibox/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698