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

Side by Side Diff: components/omnibox/browser/zero_suggest_provider.h

Issue 2738003002: Add title to current page in zero suggest. (Closed)
Patch Set: Remove debugging info. Created 3 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
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 // This file contains the zero-suggest autocomplete provider. This experimental 5 // This file contains the zero-suggest autocomplete provider. This experimental
6 // provider is invoked when the user focuses in the omnibox prior to editing, 6 // provider is invoked when the user focuses in the omnibox prior to editing,
7 // and generates search query suggestions based on the current URL. 7 // and generates search query suggestions based on the current URL.
8 8
9 #ifndef COMPONENTS_OMNIBOX_BROWSER_ZERO_SUGGEST_PROVIDER_H_ 9 #ifndef COMPONENTS_OMNIBOX_BROWSER_ZERO_SUGGEST_PROVIDER_H_
10 #define COMPONENTS_OMNIBOX_BROWSER_ZERO_SUGGEST_PROVIDER_H_ 10 #define COMPONENTS_OMNIBOX_BROWSER_ZERO_SUGGEST_PROVIDER_H_
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 void MaybeUseCachedSuggestions(); 133 void MaybeUseCachedSuggestions();
134 134
135 // Used for efficiency when creating the verbatim match. Can be null. 135 // Used for efficiency when creating the verbatim match. Can be null.
136 HistoryURLProvider* history_url_provider_; 136 HistoryURLProvider* history_url_provider_;
137 137
138 AutocompleteProviderListener* listener_; 138 AutocompleteProviderListener* listener_;
139 139
140 // The URL for which a suggestion fetch is pending. 140 // The URL for which a suggestion fetch is pending.
141 std::string current_query_; 141 std::string current_query_;
142 142
143 // The title of the page for which a suggestion fetch is pending.
144 base::string16 current_title_;
145
143 // The type of page the user is viewing (a search results page doing search 146 // The type of page the user is viewing (a search results page doing search
144 // term replacement, an arbitrary URL, etc.). 147 // term replacement, an arbitrary URL, etc.).
145 metrics::OmniboxEventProto::PageClassification current_page_classification_; 148 metrics::OmniboxEventProto::PageClassification current_page_classification_;
146 149
147 // Copy of OmniboxEditModel::permanent_text_. 150 // Copy of OmniboxEditModel::permanent_text_.
148 base::string16 permanent_text_; 151 base::string16 permanent_text_;
149 152
150 // Fetcher used to retrieve results. 153 // Fetcher used to retrieve results.
151 std::unique_ptr<net::URLFetcher> fetcher_; 154 std::unique_ptr<net::URLFetcher> fetcher_;
152 155
(...skipping 12 matching lines...) Expand all
165 // Whether we are waiting for a most visited visited urls callback to run. 168 // Whether we are waiting for a most visited visited urls callback to run.
166 bool waiting_for_most_visited_urls_request_; 169 bool waiting_for_most_visited_urls_request_;
167 170
168 // For callbacks that may be run after destruction. 171 // For callbacks that may be run after destruction.
169 base::WeakPtrFactory<ZeroSuggestProvider> weak_ptr_factory_; 172 base::WeakPtrFactory<ZeroSuggestProvider> weak_ptr_factory_;
170 173
171 DISALLOW_COPY_AND_ASSIGN(ZeroSuggestProvider); 174 DISALLOW_COPY_AND_ASSIGN(ZeroSuggestProvider);
172 }; 175 };
173 176
174 #endif // COMPONENTS_OMNIBOX_BROWSER_ZERO_SUGGEST_PROVIDER_H_ 177 #endif // COMPONENTS_OMNIBOX_BROWSER_ZERO_SUGGEST_PROVIDER_H_
OLDNEW
« no previous file with comments | « components/omnibox/browser/verbatim_match.cc ('k') | components/omnibox/browser/zero_suggest_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698