Commit 3fbdb140 authored by Justin Cohen's avatar Justin Cohen Committed by Commit Bot

[ios] Initialize tab strip count.

Bug: 841212
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I4cdfef554f257a7bd920aa9efba184ae8d4126ba
Reviewed-on: https://chromium-review.googlesource.com/1052549Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557275}
parent 2db59ceb
......@@ -1106,9 +1106,8 @@ NSString* StringForItemCount(long count) {
}
- (void)tabModelDidChangeTabCount:(TabModel*)model {
const NSUInteger tabCount = [_tabArray count] - [_closingTabs count];
if (IsUIRefreshPhase1Enabled()) {
[_tabSwitcherButton setTitle:StringForItemCount(tabCount)
[_tabSwitcherButton setTitle:StringForItemCount(model.count)
forState:UIControlStateNormal];
}
}
......@@ -1171,6 +1170,7 @@ NSString* StringForItemCount(long count) {
[_tabSwitcherButton addTarget:self
action:@selector(recordUserMetrics:)
forControlEvents:UIControlEventTouchUpInside];
[self tabModelDidChangeTabCount:_tabModel];
SetA11yLabelAndUiAutomationName(_tabSwitcherButton,
tabSwitcherButtonIdsAccessibilityLabel,
......
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