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

Unified Diff: components/omnibox/autocomplete_match.cc

Issue 847833002: Upstream iOS specific design for omnibox (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove common/ subdirectory Created 5 years, 11 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
« no previous file with comments | « no previous file | components/resources/autofill_scaled_resources.grdp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/omnibox/autocomplete_match.cc
diff --git a/components/omnibox/autocomplete_match.cc b/components/omnibox/autocomplete_match.cc
index 8d656aacc3fb88543bb772be4e22da462e97ce8b..f71435e7232bfad6199bc8c14cc1a10862136de9 100644
--- a/components/omnibox/autocomplete_match.cc
+++ b/components/omnibox/autocomplete_match.cc
@@ -135,30 +135,54 @@ AutocompleteMatch& AutocompleteMatch::operator=(
// static
int AutocompleteMatch::TypeToIcon(Type type) {
- int icons[] = {
- IDR_OMNIBOX_HTTP,
- IDR_OMNIBOX_HTTP,
- IDR_OMNIBOX_HTTP,
- IDR_OMNIBOX_HTTP,
- IDR_OMNIBOX_HTTP,
- IDR_OMNIBOX_HTTP,
- IDR_OMNIBOX_SEARCH,
- IDR_OMNIBOX_SEARCH,
- IDR_OMNIBOX_SEARCH,
- IDR_OMNIBOX_SEARCH,
- IDR_OMNIBOX_SEARCH,
- IDR_OMNIBOX_SEARCH,
- IDR_OMNIBOX_SEARCH,
- IDR_OMNIBOX_SEARCH,
- IDR_OMNIBOX_EXTENSION_APP,
- IDR_OMNIBOX_SEARCH,
- IDR_OMNIBOX_HTTP,
- IDR_OMNIBOX_HTTP,
- IDR_OMNIBOX_SEARCH,
+#if !defined(OS_IOS)
+ static const int kIcons[] = {
+ IDR_OMNIBOX_HTTP, // URL_WHAT_YOU_TYPE
+ IDR_OMNIBOX_HTTP, // HISTORY_URL
+ IDR_OMNIBOX_HTTP, // HISTORY_TITLE
+ IDR_OMNIBOX_HTTP, // HISTORY_BODY
+ IDR_OMNIBOX_HTTP, // HISTORY_KEYWORD
+ IDR_OMNIBOX_HTTP, // NAVSUGGEST
+ IDR_OMNIBOX_SEARCH, // SEARCH_WHAT_YOU_TYPED
+ IDR_OMNIBOX_SEARCH, // SEARCH_HISTORY
+ IDR_OMNIBOX_SEARCH, // SEARCH_SUGGEST
+ IDR_OMNIBOX_SEARCH, // SEARCH_SUGGEST_ENTITY
+ IDR_OMNIBOX_SEARCH, // SEARCH_SUGGEST_INFINITE
+ IDR_OMNIBOX_SEARCH, // SEARCH_SUGGEST_PERSONALIZED
+ IDR_OMNIBOX_SEARCH, // SEARCH_SUGGEST_PROFILE
+ IDR_OMNIBOX_SEARCH, // SEARCH_OTHER_ENGINE
+ IDR_OMNIBOX_EXTENSION_APP, // EXTENSION_APP
+ IDR_OMNIBOX_SEARCH, // CONTACT_DEPRECATED
+ IDR_OMNIBOX_HTTP, // BOOKMARK_TITLE
+ IDR_OMNIBOX_HTTP, // NAVSUGGEST_PERSONALIZED
+ IDR_OMNIBOX_SEARCH, // SEARCH_SUGGEST_ANSWER
};
- static_assert(arraysize(icons) == AutocompleteMatchType::NUM_TYPES,
+#else
+ static const int kIcons[] = {
+ IDR_OMNIBOX_HTTP, // URL_WHAT_YOU_TYPE
+ IDR_OMNIBOX_HISTORY, // HISTORY_URL
+ IDR_OMNIBOX_HISTORY, // HISTORY_TITLE
+ IDR_OMNIBOX_HISTORY, // HISTORY_BODY
+ IDR_OMNIBOX_HISTORY, // HISTORY_KEYWORD
+ IDR_OMNIBOX_HTTP, // NAVSUGGEST
+ IDR_OMNIBOX_SEARCH, // SEARCH_WHAT_YOU_TYPED
+ IDR_OMNIBOX_HISTORY, // SEARCH_HISTORY
+ IDR_OMNIBOX_SEARCH, // SEARCH_SUGGEST
+ IDR_OMNIBOX_SEARCH, // SEARCH_SUGGEST_ENTITY
+ IDR_OMNIBOX_SEARCH, // SEARCH_SUGGEST_INFINITE
+ IDR_OMNIBOX_SEARCH, // SEARCH_SUGGEST_PERSONALIZED
+ IDR_OMNIBOX_SEARCH, // SEARCH_SUGGEST_PROFILE
+ IDR_OMNIBOX_SEARCH, // SEARCH_OTHER_ENGINE
+ IDR_OMNIBOX_EXTENSION_APP, // EXTENSION_APP
+ IDR_OMNIBOX_SEARCH, // CONTACT_DEPRECATED
+ IDR_OMNIBOX_HTTP, // BOOKMARK_TITLE
+ IDR_OMNIBOX_HTTP, // NAVSUGGEST_PERSONALIZED
+ IDR_OMNIBOX_SEARCH, // SEARCH_SUGGEST_ANSWER
+ };
+#endif
+ static_assert(arraysize(kIcons) == AutocompleteMatchType::NUM_TYPES,
"icons array must have NUM_TYPES elements");
- return icons[type];
+ return kIcons[type];
}
// static
« no previous file with comments | « no previous file | components/resources/autofill_scaled_resources.grdp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698