OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |