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

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

Issue 18878007: Omnibox: Make the Controller Reorder Matches for Inlining (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Lacks -> has Created 7 years, 4 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_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 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 253
254 // This string is loaded into the location bar when the item is selected 254 // This string is loaded into the location bar when the item is selected
255 // by pressing the arrow keys. This may be different than a URL, for example, 255 // by pressing the arrow keys. This may be different than a URL, for example,
256 // for search suggestions, this would just be the search terms. 256 // for search suggestions, this would just be the search terms.
257 string16 fill_into_edit; 257 string16 fill_into_edit;
258 258
259 // The inline autocompletion to display after the user's typing in the 259 // The inline autocompletion to display after the user's typing in the
260 // omnibox, if this match becomes the default match. It may be empty. 260 // omnibox, if this match becomes the default match. It may be empty.
261 string16 inline_autocompletion; 261 string16 inline_autocompletion;
262 262
263 // If false, the omnibox should prevent this match from being the
264 // default match. Providers should set this to true only if the
265 // user's input, plus any inline autocompletion on this match, would
266 // lead the user to expect a navigation to this match's destination.
267 // For example, with input "foo", a search for "bar" or navigation
268 // to "bar.com" should not set this flag; a navigation to "foo.com"
269 // should only set this flag if ".com" will be inline autocompleted;
270 // and a navigation to "foo/" (an intranet host) or search for "foo"
271 // should set this flag.
272 bool allowed_to_be_default_match;
273
263 // The URL to actually load when the autocomplete item is selected. This URL 274 // The URL to actually load when the autocomplete item is selected. This URL
264 // should be canonical so we can compare URLs with strcmp to avoid dupes. 275 // should be canonical so we can compare URLs with strcmp to avoid dupes.
265 // It may be empty if there is no possible navigation. 276 // It may be empty if there is no possible navigation.
266 GURL destination_url; 277 GURL destination_url;
267 278
268 // The destination URL with "www." stripped off for better dupe finding. 279 // The destination URL with "www." stripped off for better dupe finding.
269 GURL stripped_destination_url; 280 GURL stripped_destination_url;
270 281
271 // The main text displayed in the address bar dropdown. 282 // The main text displayed in the address bar dropdown.
272 string16 contents; 283 string16 contents;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 const string16& text, 345 const string16& text,
335 const ACMatchClassifications& classifications) const; 346 const ACMatchClassifications& classifications) const;
336 #endif 347 #endif
337 }; 348 };
338 349
339 typedef AutocompleteMatch::ACMatchClassification ACMatchClassification; 350 typedef AutocompleteMatch::ACMatchClassification ACMatchClassification;
340 typedef std::vector<ACMatchClassification> ACMatchClassifications; 351 typedef std::vector<ACMatchClassification> ACMatchClassifications;
341 typedef std::vector<AutocompleteMatch> ACMatches; 352 typedef std::vector<AutocompleteMatch> ACMatches;
342 353
343 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_MATCH_H_ 354 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_MATCH_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698