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

Side by Side Diff: ios/clean/chrome/browser/ui/toolbar/toolbar_view_controller.mm

Issue 2708013002: [ios clean] Creates ToolbarWebState Mediator (Closed)
Patch Set: Renaming feedback Created 3 years, 10 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 // ====== New Architecture ===== 5 // ====== New Architecture =====
6 // = This code is only used in the new iOS Chrome architecture. = 6 // = This code is only used in the new iOS Chrome architecture. =
7 // ============================================================================ 7 // ============================================================================
8 8
9 #import "ios/clean/chrome/browser/ui/toolbar/toolbar_view_controller.h" 9 #import "ios/clean/chrome/browser/ui/toolbar/toolbar_view_controller.h"
10 10
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 previousTraitCollection.horizontalSizeClass) { 164 previousTraitCollection.horizontalSizeClass) {
165 for (UIView* view in self.stackView.arrangedSubviews) { 165 for (UIView* view in self.stackView.arrangedSubviews) {
166 if ([view isKindOfClass:[ToolbarButton class]]) { 166 if ([view isKindOfClass:[ToolbarButton class]]) {
167 ToolbarButton* button = base::mac::ObjCCastStrict<ToolbarButton>(view); 167 ToolbarButton* button = base::mac::ObjCCastStrict<ToolbarButton>(view);
168 [button updateHiddenInCurrentSizeClass]; 168 [button updateHiddenInCurrentSizeClass];
169 } 169 }
170 } 170 }
171 } 171 }
172 } 172 }
173 173
174 #pragma mark - Public API 174 #pragma mark - ToolbarWebStateConsumer
175 175
176 - (void)setCurrentPageText:(NSString*)text { 176 - (void)setCurrentPageText:(NSString*)text {
177 self.omnibox.text = text; 177 self.omnibox.text = text;
178 } 178 }
179 179
180 #pragma mark - ZoomTransitionDelegate 180 #pragma mark - ZoomTransitionDelegate
181 181
182 - (CGRect)rectForZoomWithKey:(NSObject*)key inView:(UIView*)view { 182 - (CGRect)rectForZoomWithKey:(NSObject*)key inView:(UIView*)view {
183 return [view convertRect:self.toolsMenuButton.bounds 183 return [view convertRect:self.toolsMenuButton.bounds
184 fromView:self.toolsMenuButton]; 184 fromView:self.toolsMenuButton];
(...skipping 19 matching lines...) Expand all
204 - (void)updateAllButtonsVisibility { 204 - (void)updateAllButtonsVisibility {
205 for (UIView* view in self.stackView.arrangedSubviews) { 205 for (UIView* view in self.stackView.arrangedSubviews) {
206 if ([view isKindOfClass:[ToolbarButton class]]) { 206 if ([view isKindOfClass:[ToolbarButton class]]) {
207 ToolbarButton* button = base::mac::ObjCCastStrict<ToolbarButton>(view); 207 ToolbarButton* button = base::mac::ObjCCastStrict<ToolbarButton>(view);
208 [button setHiddenForCurrentStateAndSizeClass]; 208 [button setHiddenForCurrentStateAndSizeClass];
209 } 209 }
210 } 210 }
211 } 211 }
212 212
213 @end 213 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698