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