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

Side by Side Diff: components/omnibox/keyword_provider.h

Issue 985503002: Omnibox - Make Omnibox Extensions Ignore Stop() Calls Due to User Idleness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make unit tests compile Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « components/omnibox/autocomplete_provider.cc ('k') | components/omnibox/keyword_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // This file contains the keyword autocomplete provider. The keyword provider 5 // This file contains the keyword autocomplete provider. The keyword provider
6 // is responsible for remembering/suggesting user "search keyword queries" 6 // is responsible for remembering/suggesting user "search keyword queries"
7 // (e.g. "imdb Godzilla") and then fixing them up into valid URLs. An 7 // (e.g. "imdb Godzilla") and then fixing them up into valid URLs. An
8 // instance of it gets created and managed by the autocomplete controller. 8 // instance of it gets created and managed by the autocomplete controller.
9 // KeywordProvider uses a TemplateURLService to find the set of keywords. 9 // KeywordProvider uses a TemplateURLService to find the set of keywords.
10 10
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 90
91 // Creates a fully marked-up AutocompleteMatch for a specific keyword. 91 // Creates a fully marked-up AutocompleteMatch for a specific keyword.
92 AutocompleteMatch CreateVerbatimMatch(const base::string16& text, 92 AutocompleteMatch CreateVerbatimMatch(const base::string16& text,
93 const base::string16& keyword, 93 const base::string16& keyword,
94 const AutocompleteInput& input); 94 const AutocompleteInput& input);
95 95
96 // AutocompleteProvider: 96 // AutocompleteProvider:
97 void Start(const AutocompleteInput& input, 97 void Start(const AutocompleteInput& input,
98 bool minimal_changes, 98 bool minimal_changes,
99 bool called_due_to_focus) override; 99 bool called_due_to_focus) override;
100 void Stop(bool clear_cached_results) override; 100 void Stop(bool clear_cached_results,
101 bool due_to_user_inactivity) override;
101 102
102 private: 103 private:
103 friend class KeywordExtensionsDelegateImpl; 104 friend class KeywordExtensionsDelegateImpl;
104 105
105 ~KeywordProvider() override; 106 ~KeywordProvider() override;
106 107
107 // Extracts the keyword from |input| into |keyword|. Any remaining characters 108 // Extracts the keyword from |input| into |keyword|. Any remaining characters
108 // after the keyword are placed in |remaining_input|. Returns true if |input| 109 // after the keyword are placed in |remaining_input|. Returns true if |input|
109 // is valid and has a keyword. This makes use of SplitKeywordFromInput to 110 // is valid and has a keyword. This makes use of SplitKeywordFromInput to
110 // extract the keyword and remaining string, and uses 111 // extract the keyword and remaining string, and uses
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 TemplateURLService* model_; 151 TemplateURLService* model_;
151 152
152 // Delegate to handle the extensions-only logic for KeywordProvider. 153 // Delegate to handle the extensions-only logic for KeywordProvider.
153 // NULL when extensions are not enabled. May be NULL for tests. 154 // NULL when extensions are not enabled. May be NULL for tests.
154 scoped_ptr<KeywordExtensionsDelegate> extensions_delegate_; 155 scoped_ptr<KeywordExtensionsDelegate> extensions_delegate_;
155 156
156 DISALLOW_COPY_AND_ASSIGN(KeywordProvider); 157 DISALLOW_COPY_AND_ASSIGN(KeywordProvider);
157 }; 158 };
158 159
159 #endif // COMPONENTS_OMNIBOX_KEYWORD_PROVIDER_H_ 160 #endif // COMPONENTS_OMNIBOX_KEYWORD_PROVIDER_H_
OLDNEW
« no previous file with comments | « components/omnibox/autocomplete_provider.cc ('k') | components/omnibox/keyword_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698