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

Side by Side Diff: chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm

Issue 1886903002: [Mac] Restore menu position for buttons after Material Design changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « chrome/browser/ui/cocoa/toolbar/toolbar_controller.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h" 5 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/mac/bundle_locations.h" 9 #include "base/mac/bundle_locations.h"
10 #include "base/mac/foundation_util.h" 10 #include "base/mac/foundation_util.h"
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 } 237 }
238 238
239 + (CGFloat)appMenuLeftPadding { 239 + (CGFloat)appMenuLeftPadding {
240 if (!ui::MaterialDesignController::IsModeMaterial()) { 240 if (!ui::MaterialDesignController::IsModeMaterial()) {
241 return 3; 241 return 3;
242 } 242 }
243 243
244 return kMaterialDesignElementPadding; 244 return kMaterialDesignElementPadding;
245 } 245 }
246 246
247 + (CGFloat)materialDesignButtonInset {
248 return kMaterialDesignButtonInset;
249 }
250
247 - (id)initWithCommands:(CommandUpdater*)commands 251 - (id)initWithCommands:(CommandUpdater*)commands
248 profile:(Profile*)profile 252 profile:(Profile*)profile
249 browser:(Browser*)browser 253 browser:(Browser*)browser
250 resizeDelegate:(id<ViewResizer>)resizeDelegate { 254 resizeDelegate:(id<ViewResizer>)resizeDelegate {
251 DCHECK(commands && profile); 255 DCHECK(commands && profile);
252 if ((self = [super initWithNibName:@"Toolbar" 256 if ((self = [super initWithNibName:@"Toolbar"
253 bundle:base::mac::FrameworkBundle()])) { 257 bundle:base::mac::FrameworkBundle()])) {
254 commands_ = commands; 258 commands_ = commands;
255 profile_ = profile; 259 profile_ = profile;
256 browser_ = browser; 260 browser_ = browser;
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after
1147 - (void)hideDropURLsIndicatorInView:(NSView*)view { 1151 - (void)hideDropURLsIndicatorInView:(NSView*)view {
1148 // Do nothing. 1152 // Do nothing.
1149 } 1153 }
1150 1154
1151 // (URLDropTargetController protocol) 1155 // (URLDropTargetController protocol)
1152 - (BOOL)isUnsupportedDropData:(id<NSDraggingInfo>)info { 1156 - (BOOL)isUnsupportedDropData:(id<NSDraggingInfo>)info {
1153 return drag_util::IsUnsupportedDropData(profile_, info); 1157 return drag_util::IsUnsupportedDropData(profile_, info);
1154 } 1158 }
1155 1159
1156 @end 1160 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/toolbar/toolbar_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698