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

Unified Diff: chrome/browser/autocomplete/autocomplete_match.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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/autocomplete/autocomplete_match.h
===================================================================
--- chrome/browser/autocomplete/autocomplete_match.h (revision 80563)
+++ chrome/browser/autocomplete/autocomplete_match.h (working copy)
@@ -9,8 +9,10 @@
#include <vector>
#include <string>
+#include "base/memory/ref_counted.h"
#include "content/common/page_transition_types.h"
#include "googleurl/src/gurl.h"
+#include "chrome/browser/profiles/profile.h"
Peter Kasting 2011/04/07 20:19:21 Nit: #includes in alphabetical order
class AutocompleteProvider;
class PageTransition;
@@ -63,6 +65,24 @@
typedef std::vector<ACMatchClassification> ACMatchClassifications;
+ struct Keyword : public base::RefCounted<Keyword> {
+ Keyword()
+ : is_keyword_hint(false), is_keyword_mode(false) {
+ }
+
+ string16 text;
+
+ const TemplateURL* template_url;
+
+ // True if this match should show a keyword hint.
+ bool is_keyword_hint;
+
+ // True if the keyword has been accepted or if the default
+ // is to show keyword mode.
+ bool is_keyword_mode;
+
Peter Kasting 2011/04/07 20:19:21 Nit: Extra newline
+ };
+
// The type of this match.
enum Type {
URL_WHAT_YOU_TYPED = 0, // The input as a URL.
@@ -123,6 +143,10 @@
int style,
ACMatchClassifications* classifications);
+ // Copies the destination_url with "www." stripped off to
+ // destination_url_normalized
+ void ComputeStrippedDestinationURL();
+
// The provider of this match, used to remember which provider the user had
// selected when the input changes. This may be NULL, in which case there is
// no provider (or memory of the user's selection).
@@ -155,6 +179,9 @@
// It may be empty if there is no possible navigation.
GURL destination_url;
+ // The destination URL with "www." stripped off for better dupe finding.
+ GURL destination_url_normalized;
Peter Kasting 2011/04/07 20:19:21 Nit: How about |stripped_destination_url| then?
+
// The main text displayed in the address bar dropdown.
string16 contents;
ACMatchClassifications contents_class;
@@ -179,6 +206,9 @@
// keyword was obtained from.
const TemplateURL* template_url;
+ // Keyword for this match
+ scoped_refptr<Keyword> keyword;
+
// True if the user has starred the destination URL.
bool starred;

Powered by Google App Engine
This is Rietveld 408576698