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

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

Issue 10951023: Update page icon in the omnibox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | « chrome/app/theme/theme_resources.grd ('k') | chrome/browser/autocomplete/autocomplete_match.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) 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 AutocompleteMatch(const AutocompleteMatch& match); 105 AutocompleteMatch(const AutocompleteMatch& match);
106 ~AutocompleteMatch(); 106 ~AutocompleteMatch();
107 107
108 // Converts |type| to a string representation. Used in logging and debugging. 108 // Converts |type| to a string representation. Used in logging and debugging.
109 AutocompleteMatch& operator=(const AutocompleteMatch& match); 109 AutocompleteMatch& operator=(const AutocompleteMatch& match);
110 110
111 // Converts |type| to a string representation. Used in logging. 111 // Converts |type| to a string representation. Used in logging.
112 static std::string TypeToString(Type type); 112 static std::string TypeToString(Type type);
113 113
114 // Converts |type| to a resource identifier for the appropriate icon for this 114 // Converts |type| to a resource identifier for the appropriate icon for this
115 // type. 115 // type to show in the completion popup.
116 static int TypeToIcon(Type type); 116 static int TypeToIcon(Type type);
117 117
118 // Converts |type| to a resource identifier for the appropriate icon for this
119 // type to show in the location bar.
120 static int TypeToLocationBarIcon(Type type);
121
118 // Comparison function for determining when one match is better than another. 122 // Comparison function for determining when one match is better than another.
119 static bool MoreRelevant(const AutocompleteMatch& elem1, 123 static bool MoreRelevant(const AutocompleteMatch& elem1,
120 const AutocompleteMatch& elem2); 124 const AutocompleteMatch& elem2);
121 125
122 // Comparison functions for removing matches with duplicate destinations. 126 // Comparison functions for removing matches with duplicate destinations.
123 // Destinations are compared using |stripped_destination_url|. Pairs of 127 // Destinations are compared using |stripped_destination_url|. Pairs of
124 // matches with empty destinations are treated as differing, since empty 128 // matches with empty destinations are treated as differing, since empty
125 // destinations are expected for non-navigable matches. 129 // destinations are expected for non-navigable matches.
126 static bool DestinationSortFunc(const AutocompleteMatch& elem1, 130 static bool DestinationSortFunc(const AutocompleteMatch& elem1,
127 const AutocompleteMatch& elem2); 131 const AutocompleteMatch& elem2);
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 const string16& text, 332 const string16& text,
329 const ACMatchClassifications& classifications) const; 333 const ACMatchClassifications& classifications) const;
330 #endif 334 #endif
331 }; 335 };
332 336
333 typedef AutocompleteMatch::ACMatchClassification ACMatchClassification; 337 typedef AutocompleteMatch::ACMatchClassification ACMatchClassification;
334 typedef std::vector<ACMatchClassification> ACMatchClassifications; 338 typedef std::vector<ACMatchClassification> ACMatchClassifications;
335 typedef std::vector<AutocompleteMatch> ACMatches; 339 typedef std::vector<AutocompleteMatch> ACMatches;
336 340
337 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_MATCH_H_ 341 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_MATCH_H_
OLDNEW
« no previous file with comments | « chrome/app/theme/theme_resources.grd ('k') | chrome/browser/autocomplete/autocomplete_match.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698