Commit 78167dfe authored by Jérôme Lebel's avatar Jérôme Lebel Committed by Commit Bot

[iOS] Adding icon for the Google Services setting menu item

Before:
https://drive.google.com/open?id=1HZzgWAeGjTOREQzj-uBROCDvS-kBMwJL
After:
https://drive.google.com/open?id=1WTN_Bhjdwrhz1kMZAQDSbKTmc0YhZrb6

Bug: 827072
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I5b3d162b495a22d55cce42fd643a4c9d982e8c87
Reviewed-on: https://chromium-review.googlesource.com/1162158Reviewed-by: default avatarSergio Collazos <sczs@chromium.org>
Commit-Queue: Jérôme Lebel <jlebel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580643}
parent 69040668
...@@ -114,6 +114,7 @@ source_set("settings") { ...@@ -114,6 +114,7 @@ source_set("settings") {
"resources:settings_search_engine", "resources:settings_search_engine",
"resources:settings_sync", "resources:settings_sync",
"resources:settings_voice_search", "resources:settings_voice_search",
"resources:sync_and_google_services",
"//base", "//base",
"//base:i18n", "//base:i18n",
"//components/autofill/core/browser", "//components/autofill/core/browser",
......
...@@ -138,3 +138,12 @@ imageset("settings_voice_search") { ...@@ -138,3 +138,12 @@ imageset("settings_voice_search") {
"settings_voice_search.imageset/settings_voice_search@3x.png", "settings_voice_search.imageset/settings_voice_search@3x.png",
] ]
} }
imageset("sync_and_google_services") {
sources = [
"sync_and_google_services.imageset/Contents.json",
"sync_and_google_services.imageset/sync_and_google_services.png",
"sync_and_google_services.imageset/sync_and_google_services@2x.png",
"sync_and_google_services.imageset/sync_and_google_services@3x.png",
]
}
{
"images": [
{
"idiom": "universal",
"scale": "1x",
"filename": "sync_and_google_services.png"
},
{
"idiom": "universal",
"scale": "2x",
"filename": "sync_and_google_services@2x.png"
},
{
"idiom": "universal",
"scale": "3x",
"filename": "sync_and_google_services@3x.png"
}
],
"info": {
"version": 1,
"author": "xcode"
}
}
...@@ -93,6 +93,20 @@ namespace { ...@@ -93,6 +93,20 @@ namespace {
const CGFloat kAccountProfilePhotoDimension = 40.0f; const CGFloat kAccountProfilePhotoDimension = 40.0f;
NSString* const kSyncAndGoogleServicesImageName = @"sync_and_google_services";
NSString* const kSettingsSearchEngineImageName = @"settings_search_engine";
NSString* const kSettingsPasswordsImageName = @"settings_passwords";
NSString* const kSettingsAutofillFormsImageName = @"settings_autofill_forms";
NSString* const kSettingsVoiceSearchImageName = @"settings_voice_search";
NSString* const kSettingsPrivacyImageName = @"settings_privacy";
NSString* const kSettingsContentSettingsImageName =
@"settings_content_settings";
NSString* const kSettingsBandwidthImageName = @"settings_bandwidth";
NSString* const kSettingsAboutChromeImageName = @"settings_about_chrome";
NSString* const kSettingsDebugImageName = @"settings_debug";
NSString* const kSettingsArticleSuggestionsImageName =
@"settings_article_suggestions";
typedef NS_ENUM(NSInteger, SectionIdentifier) { typedef NS_ENUM(NSInteger, SectionIdentifier) {
SectionIdentifierSignIn = kSectionIdentifierEnumZero, SectionIdentifierSignIn = kSectionIdentifierEnumZero,
SectionIdentifierAccount, SectionIdentifierAccount,
...@@ -506,7 +520,7 @@ void SigninObserverBridge::GoogleSignedOut(const std::string& account_id, ...@@ -506,7 +520,7 @@ void SigninObserverBridge::GoogleSignedOut(const std::string& account_id,
text:l10n_util::GetNSString( text:l10n_util::GetNSString(
IDS_IOS_GOOGLE_SERVICES_SETTINGS_TITLE) IDS_IOS_GOOGLE_SERVICES_SETTINGS_TITLE)
detailText:nil detailText:nil
iconImageName:nil]; iconImageName:kSyncAndGoogleServicesImageName];
} }
- (CollectionViewItem*)accountCellItem { - (CollectionViewItem*)accountCellItem {
...@@ -530,7 +544,7 @@ void SigninObserverBridge::GoogleSignedOut(const std::string& account_id, ...@@ -530,7 +544,7 @@ void SigninObserverBridge::GoogleSignedOut(const std::string& account_id,
text:l10n_util::GetNSString( text:l10n_util::GetNSString(
IDS_IOS_SEARCH_ENGINE_SETTING_TITLE) IDS_IOS_SEARCH_ENGINE_SETTING_TITLE)
detailText:defaultSearchEngineName detailText:defaultSearchEngineName
iconImageName:@"settings_search_engine"]; iconImageName:kSettingsSearchEngineImageName];
_defaultSearchEngineItem.accessibilityIdentifier = _defaultSearchEngineItem.accessibilityIdentifier =
kSettingsSearchEngineCellId; kSettingsSearchEngineCellId;
return _defaultSearchEngineItem; return _defaultSearchEngineItem;
...@@ -541,7 +555,7 @@ void SigninObserverBridge::GoogleSignedOut(const std::string& account_id, ...@@ -541,7 +555,7 @@ void SigninObserverBridge::GoogleSignedOut(const std::string& account_id,
[self detailItemWithType:ItemTypeSavedPasswords [self detailItemWithType:ItemTypeSavedPasswords
text:l10n_util::GetNSString(IDS_IOS_PASSWORDS) text:l10n_util::GetNSString(IDS_IOS_PASSWORDS)
detailText:nil detailText:nil
iconImageName:@"settings_passwords"]; iconImageName:kSettingsPasswordsImageName];
return _savePasswordsDetailItem; return _savePasswordsDetailItem;
} }
...@@ -556,7 +570,7 @@ void SigninObserverBridge::GoogleSignedOut(const std::string& account_id, ...@@ -556,7 +570,7 @@ void SigninObserverBridge::GoogleSignedOut(const std::string& account_id,
[self detailItemWithType:ItemTypeAutofill [self detailItemWithType:ItemTypeAutofill
text:l10n_util::GetNSString(IDS_IOS_AUTOFILL) text:l10n_util::GetNSString(IDS_IOS_AUTOFILL)
detailText:autofillDetail detailText:autofillDetail
iconImageName:@"settings_autofill_forms"]; iconImageName:kSettingsAutofillFormsImageName];
return _autoFillDetailItem; return _autoFillDetailItem;
} }
...@@ -574,7 +588,7 @@ void SigninObserverBridge::GoogleSignedOut(const std::string& account_id, ...@@ -574,7 +588,7 @@ void SigninObserverBridge::GoogleSignedOut(const std::string& account_id,
text:l10n_util::GetNSString( text:l10n_util::GetNSString(
IDS_IOS_VOICE_SEARCH_SETTING_TITLE) IDS_IOS_VOICE_SEARCH_SETTING_TITLE)
detailText:languageName detailText:languageName
iconImageName:@"settings_voice_search"]; iconImageName:kSettingsVoiceSearchImageName];
_voiceSearchDetailItem.accessibilityIdentifier = kSettingsVoiceSearchCellId; _voiceSearchDetailItem.accessibilityIdentifier = kSettingsVoiceSearchCellId;
return _voiceSearchDetailItem; return _voiceSearchDetailItem;
} }
...@@ -585,7 +599,7 @@ void SigninObserverBridge::GoogleSignedOut(const std::string& account_id, ...@@ -585,7 +599,7 @@ void SigninObserverBridge::GoogleSignedOut(const std::string& account_id,
text:l10n_util::GetNSString( text:l10n_util::GetNSString(
IDS_OPTIONS_ADVANCED_SECTION_TITLE_PRIVACY) IDS_OPTIONS_ADVANCED_SECTION_TITLE_PRIVACY)
detailText:nil detailText:nil
iconImageName:@"settings_privacy"]; iconImageName:kSettingsPrivacyImageName];
} }
- (CollectionViewItem*)contentSettingsDetailItem { - (CollectionViewItem*)contentSettingsDetailItem {
...@@ -593,7 +607,7 @@ void SigninObserverBridge::GoogleSignedOut(const std::string& account_id, ...@@ -593,7 +607,7 @@ void SigninObserverBridge::GoogleSignedOut(const std::string& account_id,
detailItemWithType:ItemTypeContentSettings detailItemWithType:ItemTypeContentSettings
text:l10n_util::GetNSString(IDS_IOS_CONTENT_SETTINGS_TITLE) text:l10n_util::GetNSString(IDS_IOS_CONTENT_SETTINGS_TITLE)
detailText:nil detailText:nil
iconImageName:@"settings_content_settings"]; iconImageName:kSettingsContentSettingsImageName];
} }
- (CollectionViewItem*)bandwidthManagementDetailItem { - (CollectionViewItem*)bandwidthManagementDetailItem {
...@@ -601,21 +615,21 @@ void SigninObserverBridge::GoogleSignedOut(const std::string& account_id, ...@@ -601,21 +615,21 @@ void SigninObserverBridge::GoogleSignedOut(const std::string& account_id,
text:l10n_util::GetNSString( text:l10n_util::GetNSString(
IDS_IOS_BANDWIDTH_MANAGEMENT_SETTINGS) IDS_IOS_BANDWIDTH_MANAGEMENT_SETTINGS)
detailText:nil detailText:nil
iconImageName:@"settings_bandwidth"]; iconImageName:kSettingsBandwidthImageName];
} }
- (CollectionViewItem*)aboutChromeDetailItem { - (CollectionViewItem*)aboutChromeDetailItem {
return [self detailItemWithType:ItemTypeAboutChrome return [self detailItemWithType:ItemTypeAboutChrome
text:l10n_util::GetNSString(IDS_IOS_PRODUCT_NAME) text:l10n_util::GetNSString(IDS_IOS_PRODUCT_NAME)
detailText:nil detailText:nil
iconImageName:@"settings_about_chrome"]; iconImageName:kSettingsAboutChromeImageName];
} }
- (SettingsSwitchItem*)showMemoryDebugSwitchItem { - (SettingsSwitchItem*)showMemoryDebugSwitchItem {
SettingsSwitchItem* showMemoryDebugSwitchItem = SettingsSwitchItem* showMemoryDebugSwitchItem =
[self switchItemWithType:ItemTypeMemoryDebugging [self switchItemWithType:ItemTypeMemoryDebugging
title:@"Show memory debug tools" title:@"Show memory debug tools"
iconImageName:@"settings_debug" iconImageName:kSettingsDebugImageName
withDefaultsKey:nil]; withDefaultsKey:nil];
showMemoryDebugSwitchItem.on = [_showMemoryDebugToolsEnabled value]; showMemoryDebugSwitchItem.on = [_showMemoryDebugToolsEnabled value];
...@@ -627,7 +641,7 @@ void SigninObserverBridge::GoogleSignedOut(const std::string& account_id, ...@@ -627,7 +641,7 @@ void SigninObserverBridge::GoogleSignedOut(const std::string& account_id,
[self switchItemWithType:ItemTypeArticlesForYou [self switchItemWithType:ItemTypeArticlesForYou
title:l10n_util::GetNSString( title:l10n_util::GetNSString(
IDS_IOS_CONTENT_SUGGESTIONS_SETTING_TITLE) IDS_IOS_CONTENT_SUGGESTIONS_SETTING_TITLE)
iconImageName:@"settings_article_suggestions" iconImageName:kSettingsArticleSuggestionsImageName
withDefaultsKey:nil]; withDefaultsKey:nil];
articlesForYouSwitchItem.on = [_articlesEnabled value]; articlesForYouSwitchItem.on = [_articlesEnabled value];
...@@ -638,14 +652,14 @@ void SigninObserverBridge::GoogleSignedOut(const std::string& account_id, ...@@ -638,14 +652,14 @@ void SigninObserverBridge::GoogleSignedOut(const std::string& account_id,
- (SettingsSwitchItem*)viewSourceSwitchItem { - (SettingsSwitchItem*)viewSourceSwitchItem {
return [self switchItemWithType:ItemTypeViewSource return [self switchItemWithType:ItemTypeViewSource
title:@"View source menu" title:@"View source menu"
iconImageName:@"settings_debug" iconImageName:kSettingsDebugImageName
withDefaultsKey:kDevViewSourceKey]; withDefaultsKey:kDevViewSourceKey];
} }
- (SettingsSwitchItem*)logJavascriptConsoleSwitchItem { - (SettingsSwitchItem*)logJavascriptConsoleSwitchItem {
return [self switchItemWithType:ItemTypeLogJavascript return [self switchItemWithType:ItemTypeLogJavascript
title:@"Log JS" title:@"Log JS"
iconImageName:@"settings_debug" iconImageName:kSettingsDebugImageName
withDefaultsKey:kLogJavascriptKey]; withDefaultsKey:kLogJavascriptKey];
} }
...@@ -653,14 +667,14 @@ void SigninObserverBridge::GoogleSignedOut(const std::string& account_id, ...@@ -653,14 +667,14 @@ void SigninObserverBridge::GoogleSignedOut(const std::string& account_id,
return [self detailItemWithType:ItemTypeCollectionCellCatalog return [self detailItemWithType:ItemTypeCollectionCellCatalog
text:@"Collection Cell Catalog" text:@"Collection Cell Catalog"
detailText:nil detailText:nil
iconImageName:@"settings_debug"]; iconImageName:kSettingsDebugImageName];
} }
- (SettingsDetailItem*)tableViewCatalogDetailItem { - (SettingsDetailItem*)tableViewCatalogDetailItem {
return [self detailItemWithType:ItemTypeTableCellCatalog return [self detailItemWithType:ItemTypeTableCellCatalog
text:@"TableView Cell Catalog" text:@"TableView Cell Catalog"
detailText:nil detailText:nil
iconImageName:@"settings_debug"]; iconImageName:kSettingsDebugImageName];
} }
#endif // CHROMIUM_BUILD && !defined(NDEBUG) #endif // CHROMIUM_BUILD && !defined(NDEBUG)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment