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

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

Issue 9289028: Make chrome://omnibox/ be able to report per-provider matches. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove friend. Created 8 years, 11 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 | Annotate | Revision Log
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_H_ 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_H_
6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_H_ 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 // on how many times the URL for the Extension App has been typed and how 169 // on how many times the URL for the Extension App has been typed and how
170 // many of the letters match. 170 // many of the letters match.
171 171
172 class AutocompleteController; 172 class AutocompleteController;
173 class AutocompleteControllerDelegate; 173 class AutocompleteControllerDelegate;
174 class AutocompleteInput; 174 class AutocompleteInput;
175 struct AutocompleteMatch; 175 struct AutocompleteMatch;
176 class AutocompleteProvider; 176 class AutocompleteProvider;
177 class AutocompleteResult; 177 class AutocompleteResult;
178 class KeywordProvider; 178 class KeywordProvider;
179 class OmniboxUIHandler;
179 class Profile; 180 class Profile;
180 class SearchProvider; 181 class SearchProvider;
181 class TemplateURL; 182 class TemplateURL;
182 183
183 typedef std::vector<AutocompleteMatch> ACMatches; 184 typedef std::vector<AutocompleteMatch> ACMatches;
184 typedef std::vector<AutocompleteProvider*> ACProviders; 185 typedef std::vector<AutocompleteProvider*> ACProviders;
185 186
186 // AutocompleteInput ---------------------------------------------------------- 187 // AutocompleteInput ----------------------------------------------------------
187 188
188 // The user input for an autocomplete query. Allows copying. 189 // The user input for an autocomplete query. Allows copying.
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 void set_search_provider(SearchProvider* provider) { 677 void set_search_provider(SearchProvider* provider) {
677 search_provider_ = provider; 678 search_provider_ = provider;
678 } 679 }
679 #endif 680 #endif
680 SearchProvider* search_provider() const { return search_provider_; } 681 SearchProvider* search_provider() const { return search_provider_; }
681 682
682 // Getters 683 // Getters
683 const AutocompleteInput& input() const { return input_; } 684 const AutocompleteInput& input() const { return input_; }
684 const AutocompleteResult& result() const { return result_; } 685 const AutocompleteResult& result() const { return result_; }
685 bool done() const { return done_; } 686 bool done() const { return done_; }
687 const ACProviders* providers() const { return &providers_; }
686 688
687 // From AutocompleteProvider::Listener 689 // From AutocompleteProvider::Listener
688 virtual void OnProviderUpdate(bool updated_matches); 690 virtual void OnProviderUpdate(bool updated_matches);
689 691
690 private: 692 private:
691 // Updates |result_| to reflect the current provider state. Resets timers and 693 // Updates |result_| to reflect the current provider state. Resets timers and
692 // fires notifications as necessary. |is_synchronous_pass| is true only when 694 // fires notifications as necessary. |is_synchronous_pass| is true only when
693 // Start() is calling this to get the synchronous result. 695 // Start() is calling this to get the synchronous result.
694 void UpdateResult(bool is_synchronous_pass); 696 void UpdateResult(bool is_synchronous_pass);
695 697
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 // ID of the tab the selected autocomplete suggestion was opened in. 767 // ID of the tab the selected autocomplete suggestion was opened in.
766 // Set to -1 if we haven't yet determined the destination tab. 768 // Set to -1 if we haven't yet determined the destination tab.
767 SessionID::id_type tab_id; 769 SessionID::id_type tab_id;
768 // Inline autocompleted length (if displayed). 770 // Inline autocompleted length (if displayed).
769 size_t inline_autocompleted_length; 771 size_t inline_autocompleted_length;
770 // Result set. 772 // Result set.
771 const AutocompleteResult& result; 773 const AutocompleteResult& result;
772 }; 774 };
773 775
774 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_H_ 776 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/omnibox/omnibox.html » ('j') | chrome/browser/resources/omnibox/omnibox.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698