OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_CONTROLLER_H_ | 5 #ifndef COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_CONTROLLER_H_ |
6 #define COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_CONTROLLER_H_ | 6 #define COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_CONTROLLER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 return last_time_default_match_changed_; | 135 return last_time_default_match_changed_; |
136 } | 136 } |
137 | 137 |
138 private: | 138 private: |
139 friend class AutocompleteProviderTest; | 139 friend class AutocompleteProviderTest; |
140 FRIEND_TEST_ALL_PREFIXES(AutocompleteProviderTest, | 140 FRIEND_TEST_ALL_PREFIXES(AutocompleteProviderTest, |
141 RedundantKeywordsIgnoredInResult); | 141 RedundantKeywordsIgnoredInResult); |
142 FRIEND_TEST_ALL_PREFIXES(AutocompleteProviderTest, UpdateAssistedQueryStats); | 142 FRIEND_TEST_ALL_PREFIXES(AutocompleteProviderTest, UpdateAssistedQueryStats); |
143 FRIEND_TEST_ALL_PREFIXES(OmniboxViewTest, DoesNotUpdateAutocompleteOnBlur); | 143 FRIEND_TEST_ALL_PREFIXES(OmniboxViewTest, DoesNotUpdateAutocompleteOnBlur); |
144 FRIEND_TEST_ALL_PREFIXES(OmniboxViewViewsTest, CloseOmniboxPopupOnTextDrag); | 144 FRIEND_TEST_ALL_PREFIXES(OmniboxViewViewsTest, CloseOmniboxPopupOnTextDrag); |
| 145 FRIEND_TEST_ALL_PREFIXES(OmniboxViewViewsTest, MaintainCursorAfterFocusCycle); |
145 | 146 |
146 // Updates |result_| to reflect the current provider state and fires | 147 // Updates |result_| to reflect the current provider state and fires |
147 // notifications. If |regenerate_result| then we clear the result | 148 // notifications. If |regenerate_result| then we clear the result |
148 // so when we incorporate the current provider state we end up | 149 // so when we incorporate the current provider state we end up |
149 // implicitly removing all expired matches. (Normally we allow | 150 // implicitly removing all expired matches. (Normally we allow |
150 // matches from the previous result set carry over. These stale | 151 // matches from the previous result set carry over. These stale |
151 // results may outrank legitimate matches from the current result | 152 // results may outrank legitimate matches from the current result |
152 // set. Sometimes we just want the current matches; the easier way | 153 // set. Sometimes we just want the current matches; the easier way |
153 // to do this is to throw everything out and reconstruct the result | 154 // to do this is to throw everything out and reconstruct the result |
154 // set from the providers' current data.) | 155 // set from the providers' current data.) |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 // Are we in Start()? This is used to avoid updating |result_| and sending | 247 // Are we in Start()? This is used to avoid updating |result_| and sending |
247 // notifications until Start() has been invoked on all providers. | 248 // notifications until Start() has been invoked on all providers. |
248 bool in_start_; | 249 bool in_start_; |
249 | 250 |
250 TemplateURLService* template_url_service_; | 251 TemplateURLService* template_url_service_; |
251 | 252 |
252 DISALLOW_COPY_AND_ASSIGN(AutocompleteController); | 253 DISALLOW_COPY_AND_ASSIGN(AutocompleteController); |
253 }; | 254 }; |
254 | 255 |
255 #endif // COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_CONTROLLER_H_ | 256 #endif // COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_CONTROLLER_H_ |
OLD | NEW |