Commit 505f0d3a authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

Use GetToolbarVoiceSearchButtonImages

The deprecated method GetToolbarVoiceSearchButtonImageId() was
confusing and forced client code to check return value. Instead
use GetToolbarVoiceSearchButtonImages() that always return the
correct value to use.

Bug: none
Change-Id: I80b6a8b493950c054374f5faee8c907c2055d44c
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Reviewed-on: https://chromium-review.googlesource.com/952449
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541784}
parent fe32eb20
...@@ -469,19 +469,9 @@ const int styleCount = 2; ...@@ -469,19 +469,9 @@ const int styleCount = 2;
- (NSArray<UIImage*>*)voiceSearchImages { - (NSArray<UIImage*>*)voiceSearchImages {
// The voice search images can be overridden by the branded image provider. // The voice search images can be overridden by the branded image provider.
int imageID; return ios::GetChromeBrowserProvider()
if (ios::GetChromeBrowserProvider() ->GetBrandedImageProvider()
->GetBrandedImageProvider() ->GetToolbarVoiceSearchButtonImages(self.style == INCOGNITO);
->GetToolbarVoiceSearchButtonImageId(&imageID)) {
return [NSArray
arrayWithObjects:NativeImage(imageID), NativeImage(imageID), nil];
}
int voiceSearchImages[styleCount][TOOLBAR_STATE_COUNT] =
TOOLBAR_IDR_TWO_STATE(VOICE);
return [NSArray
arrayWithObjects:NativeImage(voiceSearchImages[self.style][DEFAULT]),
NativeImage(voiceSearchImages[self.style][PRESSED]),
nil];
} }
- (NSArray<UIImage*>*)TTSImages { - (NSArray<UIImage*>*)TTSImages {
......
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