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

Side by Side Diff: chrome/browser/autocomplete/autocomplete_controller.h

Issue 232023004: Ensures the autocomplete_controller input is saved and restored when changing tabs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed broken browser test. Created 6 years, 7 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 | « no previous file | chrome/browser/ui/omnibox/omnibox_controller.h » ('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 (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 CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_CONTROLLER_H_
6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_CONTROLLER_H_ 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_CONTROLLER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 // navigates to the selected match. 110 // navigates to the selected match.
111 void UpdateMatchDestinationURL(base::TimeDelta query_formulation_time, 111 void UpdateMatchDestinationURL(base::TimeDelta query_formulation_time,
112 AutocompleteMatch* match) const; 112 AutocompleteMatch* match) const;
113 113
114 HistoryURLProvider* history_url_provider() const { 114 HistoryURLProvider* history_url_provider() const {
115 return history_url_provider_; 115 return history_url_provider_;
116 } 116 }
117 KeywordProvider* keyword_provider() const { return keyword_provider_; } 117 KeywordProvider* keyword_provider() const { return keyword_provider_; }
118 SearchProvider* search_provider() const { return search_provider_; } 118 SearchProvider* search_provider() const { return search_provider_; }
119 119
120 const AutocompleteInput& input() const { return input_; }
121 const AutocompleteResult& result() const { return result_; } 120 const AutocompleteResult& result() const { return result_; }
122 bool done() const { return done_; } 121 bool done() const { return done_; }
123 const ACProviders* providers() const { return &providers_; } 122 const ACProviders* providers() const { return &providers_; }
124 123
125 const base::TimeTicks& last_time_default_match_changed() const { 124 const base::TimeTicks& last_time_default_match_changed() const {
126 return last_time_default_match_changed_; 125 return last_time_default_match_changed_;
127 } 126 }
128 127
129 private: 128 private:
130 friend class AutocompleteProviderTest; 129 friend class AutocompleteProviderTest;
131 FRIEND_TEST_ALL_PREFIXES(AutocompleteProviderTest, 130 FRIEND_TEST_ALL_PREFIXES(AutocompleteProviderTest,
132 RedundantKeywordsIgnoredInResult); 131 RedundantKeywordsIgnoredInResult);
133 FRIEND_TEST_ALL_PREFIXES(AutocompleteProviderTest, UpdateAssistedQueryStats); 132 FRIEND_TEST_ALL_PREFIXES(AutocompleteProviderTest, UpdateAssistedQueryStats);
134 FRIEND_TEST_ALL_PREFIXES(AutocompleteProviderTest, GetDestinationURL); 133 FRIEND_TEST_ALL_PREFIXES(AutocompleteProviderTest, GetDestinationURL);
134 FRIEND_TEST_ALL_PREFIXES(OmniboxViewTest, DoesNotUpdateAutocompleteOnBlur);
135 135
136 // Updates |result_| to reflect the current provider state and fires 136 // Updates |result_| to reflect the current provider state and fires
137 // notifications. If |regenerate_result| then we clear the result 137 // notifications. If |regenerate_result| then we clear the result
138 // so when we incorporate the current provider state we end up 138 // so when we incorporate the current provider state we end up
139 // implicitly removing all expired matches. (Normally we allow 139 // implicitly removing all expired matches. (Normally we allow
140 // matches from the previous result set carry over. These stale 140 // matches from the previous result set carry over. These stale
141 // results may outrank legitimate matches from the current result 141 // results may outrank legitimate matches from the current result
142 // set. Sometimes we just want the current matches; the easier way 142 // set. Sometimes we just want the current matches; the easier way
143 // to do this is to throw everything out and reconstruct the result 143 // to do this is to throw everything out and reconstruct the result
144 // set from the providers' current data.) 144 // set from the providers' current data.)
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 // Are we in Start()? This is used to avoid updating |result_| and sending 228 // Are we in Start()? This is used to avoid updating |result_| and sending
229 // notifications until Start() has been invoked on all providers. 229 // notifications until Start() has been invoked on all providers.
230 bool in_start_; 230 bool in_start_;
231 231
232 Profile* profile_; 232 Profile* profile_;
233 233
234 DISALLOW_COPY_AND_ASSIGN(AutocompleteController); 234 DISALLOW_COPY_AND_ASSIGN(AutocompleteController);
235 }; 235 };
236 236
237 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_CONTROLLER_H_ 237 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/omnibox/omnibox_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698