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

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

Issue 119334: Merge r17891.... (Closed) Base URL: svn://chrome-svn/chrome/branches/184/src/
Patch Set: Created 11 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete.cc » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 // result set that tracks the displayed matches. 757 // result set that tracks the displayed matches.
758 void Stop(bool clear_result); 758 void Stop(bool clear_result);
759 759
760 // Asks the relevant provider to delete |match|, and ensures observers are 760 // Asks the relevant provider to delete |match|, and ensures observers are
761 // notified of resulting changes immediately. 761 // notified of resulting changes immediately.
762 void DeleteMatch(const AutocompleteMatch& match); 762 void DeleteMatch(const AutocompleteMatch& match);
763 763
764 // Getters 764 // Getters
765 const AutocompleteInput& input() const { return input_; } 765 const AutocompleteInput& input() const { return input_; }
766 const AutocompleteResult& result() const { return result_; } 766 const AutocompleteResult& result() const { return result_; }
767 // This next is temporary and should go away when
768 // AutocompletePopup::URLsForCurrentSelection() moves to the controller.
769 const AutocompleteResult& latest_result() const { return latest_result_; }
767 const bool done() const { return done_; } 770 const bool done() const { return done_; }
768 771
769 // From AutocompleteProvider::Listener 772 // From AutocompleteProvider::Listener
770 virtual void OnProviderUpdate(bool updated_matches); 773 virtual void OnProviderUpdate(bool updated_matches);
771 774
772 private: 775 private:
773 // Updates |latest_result_| and |done_| to reflect the current provider state. 776 // Updates |latest_result_| and |done_| to reflect the current provider state.
774 // Resets timers and fires notifications as necessary. |is_synchronous_pass| 777 // Resets timers and fires notifications as necessary. |is_synchronous_pass|
775 // is true only when Start() is calling this to get the synchronous results. 778 // is true only when Start() is calling this to get the synchronous results.
776 void UpdateLatestResult(bool is_synchronous_pass); 779 void UpdateLatestResult(bool is_synchronous_pass);
777 780
778 // Copies |latest_result_| to |result_| and notifies observers of updates. 781 // Copies |latest_result_| to |result_| and notifies observers of updates.
779 void CommitResult(); 782 void CommitResult();
783
780 // Returns the matches from |provider| whose destination urls are not in 784 // Returns the matches from |provider| whose destination urls are not in
781 // |latest_result_|. 785 // |latest_result_|.
782 ACMatches GetMatchesNotInLatestResult( 786 ACMatches GetMatchesNotInLatestResult(
783 const AutocompleteProvider* provider) const; 787 const AutocompleteProvider* provider) const;
784 788
785 // If the HistoryContentsAutocomplete provider is done and there are more 789 // If the HistoryContentsAutocomplete provider is done and there are more
786 // matches in the database than currently shown, an entry is added to 790 // matches in the database than currently shown, an entry is added to
787 // |latest_result_| to show all history matches. 791 // |latest_result_| to show all history matches.
788 void AddHistoryContentsShortcut(); 792 void AddHistoryContentsShortcut();
789 793
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 AutocompleteInput::Type input_type; 851 AutocompleteInput::Type input_type;
848 // Selected index (if selected) or -1 (AutocompletePopupModel::kNoMatch). 852 // Selected index (if selected) or -1 (AutocompletePopupModel::kNoMatch).
849 size_t selected_index; 853 size_t selected_index;
850 // Inline autocompleted length (if displayed). 854 // Inline autocompleted length (if displayed).
851 size_t inline_autocompleted_length; 855 size_t inline_autocompleted_length;
852 // Result set. 856 // Result set.
853 const AutocompleteResult& result; 857 const AutocompleteResult& result;
854 }; 858 };
855 859
856 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_H_ 860 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698