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

Side by Side Diff: ios/clean/chrome/browser/ui/tools/menu_view_controller.mm

Issue 2944703002: [ios clean] Adds ToolsMenu to Showcase. (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « no previous file | ios/showcase/BUILD.gn » ('j') | ios/showcase/tools_menu/BUILD.gn » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #import "ios/clean/chrome/browser/ui/tools/menu_view_controller.h" 5 #import "ios/clean/chrome/browser/ui/tools/menu_view_controller.h"
6 6
7 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #import "base/logging.h" 8 #import "base/logging.h"
9 #import "base/mac/foundation_util.h" 9 #import "base/mac/foundation_util.h"
10 #import "base/macros.h" 10 #import "base/macros.h"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 constraintEqualToAnchor:self.menuScrollView.bottomAnchor], 230 constraintEqualToAnchor:self.menuScrollView.bottomAnchor],
231 [self.menuStackView.topAnchor 231 [self.menuStackView.topAnchor
232 constraintEqualToAnchor:self.menuScrollView.topAnchor], 232 constraintEqualToAnchor:self.menuScrollView.topAnchor],
233 [self.menuStackView.widthAnchor 233 [self.menuStackView.widthAnchor
234 constraintEqualToAnchor:self.menuScrollView.widthAnchor], 234 constraintEqualToAnchor:self.menuScrollView.widthAnchor],
235 [self.menuStackView.heightAnchor 235 [self.menuStackView.heightAnchor
236 constraintEqualToConstant:kMenuItemHeight * self.menuItems.count], 236 constraintEqualToConstant:kMenuItemHeight * self.menuItems.count],
237 // CloseMenu Button Constraint. 237 // CloseMenu Button Constraint.
238 [self.closeMenuButton.trailingAnchor 238 [self.closeMenuButton.trailingAnchor
239 constraintEqualToAnchor:self.view.trailingAnchor], 239 constraintEqualToAnchor:self.view.trailingAnchor],
240 [self.closeMenuButton.topAnchor
sczs 2017/06/16 20:46:34 Missing constraint that Showcase helped me notice
lpromero 2017/06/19 09:38:49 Awesome!
241 constraintEqualToAnchor:self.menuScrollView.topAnchor],
240 ]]; 242 ]];
241 } 243 }
242 244
243 #pragma mark - Tools Consumer 245 #pragma mark - Tools Consumer
244 246
245 - (void)setToolsMenuItems:(NSArray*)menuItems { 247 - (void)setToolsMenuItems:(NSArray*)menuItems {
246 _menuItems = menuItems; 248 _menuItems = menuItems;
247 } 249 }
248 250
249 - (void)displayOverflowControls:(BOOL)displayOverflowControls { 251 - (void)displayOverflowControls:(BOOL)displayOverflowControls {
250 self.displayOverflowControls = displayOverflowControls; 252 self.displayOverflowControls = displayOverflowControls;
251 } 253 }
252 254
253 - (void)setIsLoading:(BOOL)isLoading { 255 - (void)setIsLoading:(BOOL)isLoading {
254 self.currentPageLoading = isLoading; 256 self.currentPageLoading = isLoading;
255 } 257 }
256 258
257 - (void)setCurrentPageLoading:(BOOL)currentPageLoading { 259 - (void)setCurrentPageLoading:(BOOL)currentPageLoading {
258 _currentPageLoading = currentPageLoading; 260 _currentPageLoading = currentPageLoading;
259 // If the OverflowButtons have been initialized update their visibility. 261 // If the OverflowButtons have been initialized update their visibility.
260 if (self.toolbarOverflowStackView) { 262 if (self.toolbarOverflowStackView) {
261 self.toolbarOverflowStackView.reloadButton.hidden = currentPageLoading; 263 self.toolbarOverflowStackView.reloadButton.hidden = currentPageLoading;
262 self.toolbarOverflowStackView.stopButton.hidden = !currentPageLoading; 264 self.toolbarOverflowStackView.stopButton.hidden = !currentPageLoading;
263 } 265 }
264 } 266 }
265 267
266 @end 268 @end
OLDNEW
« no previous file with comments | « no previous file | ios/showcase/BUILD.gn » ('j') | ios/showcase/tools_menu/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698