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

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

Issue 6731036: Enabled pressing TAB to cycle through the Omnibox results. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 8 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 663
664 // Asks the relevant provider to delete |match|, and ensures observers are 664 // Asks the relevant provider to delete |match|, and ensures observers are
665 // notified of resulting changes immediately. This should only be called when 665 // notified of resulting changes immediately. This should only be called when
666 // no query is running. 666 // no query is running.
667 void DeleteMatch(const AutocompleteMatch& match); 667 void DeleteMatch(const AutocompleteMatch& match);
668 668
669 // Removes any entries that were copied from the last result. This is used by 669 // Removes any entries that were copied from the last result. This is used by
670 // the popup to ensure it's not showing an out-of-date query. 670 // the popup to ensure it's not showing an out-of-date query.
671 void ExpireCopiedEntries(); 671 void ExpireCopiedEntries();
672 672
673 // Gets the selected keyword for the given text.
Peter Kasting 2011/04/11 23:17:33 Nit: This comment is wrong. Should be something l
674 string16 GetKeywordForText(const string16& text) const;
675
673 SearchProvider* search_provider() const { return search_provider_; } 676 SearchProvider* search_provider() const { return search_provider_; }
674 677
675 // Getters 678 // Getters
676 const AutocompleteInput& input() const { return input_; } 679 const AutocompleteInput& input() const { return input_; }
677 const AutocompleteResult& result() const { return result_; } 680 const AutocompleteResult& result() const { return result_; }
678 bool done() const { return done_; } 681 bool done() const { return done_; }
679 682
680 // From AutocompleteProvider::Listener 683 // From AutocompleteProvider::Listener
681 virtual void OnProviderUpdate(bool updated_matches); 684 virtual void OnProviderUpdate(bool updated_matches);
682 685
(...skipping 23 matching lines...) Expand all
706 // Input passed to Start. 709 // Input passed to Start.
707 AutocompleteInput input_; 710 AutocompleteInput input_;
708 711
709 // Data from the autocomplete query. 712 // Data from the autocomplete query.
710 AutocompleteResult result_; 713 AutocompleteResult result_;
711 714
712 // Timer used to remove any matches copied from the last result. When run 715 // Timer used to remove any matches copied from the last result. When run
713 // invokes |ExpireCopiedEntries|. 716 // invokes |ExpireCopiedEntries|.
714 base::OneShotTimer<AutocompleteController> expire_timer_; 717 base::OneShotTimer<AutocompleteController> expire_timer_;
715 718
719 Profile* profile_;
720
716 // True if a query is not currently running. 721 // True if a query is not currently running.
717 bool done_; 722 bool done_;
718 723
719 // Are we in Start()? This is used to avoid updating |result_| and sending 724 // Are we in Start()? This is used to avoid updating |result_| and sending
720 // notifications until Start() has been invoked on all providers. 725 // notifications until Start() has been invoked on all providers.
721 bool in_start_; 726 bool in_start_;
722 727
723 DISALLOW_COPY_AND_ASSIGN(AutocompleteController); 728 DISALLOW_COPY_AND_ASSIGN(AutocompleteController);
724 }; 729 };
725 730
(...skipping 19 matching lines...) Expand all
745 AutocompleteInput::Type input_type; 750 AutocompleteInput::Type input_type;
746 // Selected index (if selected) or -1 (AutocompletePopupModel::kNoMatch). 751 // Selected index (if selected) or -1 (AutocompletePopupModel::kNoMatch).
747 size_t selected_index; 752 size_t selected_index;
748 // Inline autocompleted length (if displayed). 753 // Inline autocompleted length (if displayed).
749 size_t inline_autocompleted_length; 754 size_t inline_autocompleted_length;
750 // Result set. 755 // Result set.
751 const AutocompleteResult& result; 756 const AutocompleteResult& result;
752 }; 757 };
753 758
754 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_H_ 759 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698