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

Unified Diff: chrome/browser/extensions/extension_omnibox_api.h

Issue 2807033: Add support for omnibox.onInputStarted and onInputCancelled. (Closed)
Patch Set: fix Stop Created 10 years, 6 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/browser/extensions/extension_omnibox_api.h
diff --git a/chrome/browser/extensions/extension_omnibox_api.h b/chrome/browser/extensions/extension_omnibox_api.h
index 4af9ee5d1a776b7527f12c1d087b3cf7737f3215..320b40af1391bd3177ed910c2e3d526b6516eae9 100644
--- a/chrome/browser/extensions/extension_omnibox_api.h
+++ b/chrome/browser/extensions/extension_omnibox_api.h
@@ -12,6 +12,11 @@
// Event router class for events related to the omnibox API.
class ExtensionOmniboxEventRouter {
public:
+ // The user has just typed the omnibox keyword. This is sent exactly once in
+ // a given input session, before any OnInputChanged events.
+ static void OnInputStarted(
+ Profile* profile, const std::string& extension_id);
+
// The user has changed what is typed into the omnibox while in an extension
// keyword session. Returns true if someone is listening to this event, and
// thus we have some degree of confidence we'll get a response.
@@ -24,6 +29,11 @@ class ExtensionOmniboxEventRouter {
Profile* profile, const std::string& extension_id,
const std::string& input);
+ // The user has cleared the keyword, or closed the omnibox popup. This is
+ // sent at most once in a give input session, after any OnInputChanged events.
+ static void OnInputCancelled(
+ Profile* profile, const std::string& extension_id);
+
private:
DISALLOW_COPY_AND_ASSIGN(ExtensionOmniboxEventRouter);
};
« no previous file with comments | « chrome/browser/extensions/extension_message_service.cc ('k') | chrome/browser/extensions/extension_omnibox_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698