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

Unified Diff: chrome/browser/autocomplete/keyword_provider.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
« no previous file with comments | « chrome/browser/autocomplete/autocomplete.cc ('k') | chrome/browser/autocomplete/keyword_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/keyword_provider.h
diff --git a/chrome/browser/autocomplete/keyword_provider.h b/chrome/browser/autocomplete/keyword_provider.h
index 3ef770dcda68df4a425e1788c15fea1c49f72df0..ee9de7aabc0c87a148a6f4635649e04d8c5025d3 100644
--- a/chrome/browser/autocomplete/keyword_provider.h
+++ b/chrome/browser/autocomplete/keyword_provider.h
@@ -68,10 +68,13 @@ class KeywordProvider :
std::wstring* remaining_input);
// AutocompleteProvider
- virtual void Start(const AutocompleteInput& input,
- bool minimal_changes);
+ virtual void Start(const AutocompleteInput& input, bool minimal_changes);
+ virtual void Stop();
private:
+ class ScopedEndExtensionKeywordMode;
+ friend class ScopedEndExtensionKeywordMode;
+
~KeywordProvider() {}
// Extracts the keyword from |input| into |keyword|. Any remaining characters
@@ -115,6 +118,9 @@ class KeywordProvider :
const std::wstring& remaining_input,
int relevance);
+ void EnterExtensionKeywordMode(const std::string& extension_id);
+ void MaybeEndExtensionKeywordMode();
+
// NotificationObserver interface.
void Observe(NotificationType type,
const NotificationSource& source,
@@ -137,6 +143,10 @@ class KeywordProvider :
// we need to reset our matches without asking the extension again.
std::vector<AutocompleteMatch> extension_suggest_matches_;
+ // If non-empty, holds the ID of the extension whose keyword is currently in
+ // the URL bar while the autocomplete popup is open.
+ std::string current_keyword_extension_id_;
+
NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(KeywordProvider);
« no previous file with comments | « chrome/browser/autocomplete/autocomplete.cc ('k') | chrome/browser/autocomplete/keyword_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698