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

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

Issue 6758031: Implement a simple Extension App Omnibox provider. (Closed) Base URL: svn://svn.chromium.org/chrome/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) 2010 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_MATCH_H_ 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_MATCH_H_
6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_MATCH_H_ 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_MATCH_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 #include <string> 10 #include <string>
11 11
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 size_t match_length, 121 size_t match_length,
122 size_t overall_length, 122 size_t overall_length,
123 int style, 123 int style,
124 ACMatchClassifications* classifications); 124 ACMatchClassifications* classifications);
125 125
126 // The provider of this match, used to remember which provider the user had 126 // The provider of this match, used to remember which provider the user had
127 // selected when the input changes. This may be NULL, in which case there is 127 // selected when the input changes. This may be NULL, in which case there is
128 // no provider (or memory of the user's selection). 128 // no provider (or memory of the user's selection).
129 AutocompleteProvider* provider; 129 AutocompleteProvider* provider;
130 130
131 // The relevance of this match. See table above for scores returned by 131 // The relevance of this match. See table in autocomplete.h for scores
132 // various providers. This is used to rank matches among all responding 132 // returned by various providers. This is used to rank matches among all
133 // providers, so different providers must be carefully tuned to supply 133 // responding providers, so different providers must be carefully tuned to
134 // matches with appropriate relevance. 134 // supply matches with appropriate relevance.
135 // 135 //
136 // TODO(pkasting): http://b/1111299 This should be calculated algorithmically, 136 // TODO(pkasting): http://b/1111299 This should be calculated algorithmically,
137 // rather than being a fairly fixed value defined by the table above. 137 // rather than being a fairly fixed value defined by the table above.
138 int relevance; 138 int relevance;
139 139
140 // True if the user should be able to delete this match. 140 // True if the user should be able to delete this match.
141 bool deletable; 141 bool deletable;
142 142
143 // This string is loaded into the location bar when the item is selected 143 // This string is loaded into the location bar when the item is selected
144 // by pressing the arrow keys. This may be different than a URL, for example, 144 // by pressing the arrow keys. This may be different than a URL, for example,
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 void ValidateClassifications( 193 void ValidateClassifications(
194 const string16& text, 194 const string16& text,
195 const ACMatchClassifications& classifications) const; 195 const ACMatchClassifications& classifications) const;
196 #endif 196 #endif
197 }; 197 };
198 198
199 typedef AutocompleteMatch::ACMatchClassification ACMatchClassification; 199 typedef AutocompleteMatch::ACMatchClassification ACMatchClassification;
200 typedef std::vector<ACMatchClassification> ACMatchClassifications; 200 typedef std::vector<ACMatchClassification> ACMatchClassifications;
201 201
202 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_MATCH_H_ 202 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_MATCH_H_
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_browsertest.cc ('k') | chrome/browser/autocomplete/extension_app_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698