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

Side by Side Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm

Issue 2046853002: [Mac][Material Design] Fix regression allowing chevron button dragging. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 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 | 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/bookmarks/bookmark_bar_controller.h" 5 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #import "base/mac/bundle_locations.h" 9 #import "base/mac/bundle_locations.h"
10 #import "base/mac/foundation_util.h" 10 #import "base/mac/foundation_util.h"
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 BookmarkButtonCell* offTheSideCell = [offTheSideButton_ cell]; 486 BookmarkButtonCell* offTheSideCell = [offTheSideButton_ cell];
487 [offTheSideCell setTag:kMaterialStandardButtonTypeWithLimitedClickFeedback]; 487 [offTheSideCell setTag:kMaterialStandardButtonTypeWithLimitedClickFeedback];
488 [offTheSideCell setImagePosition:NSImageOnly]; 488 [offTheSideCell setImagePosition:NSImageOnly];
489 489
490 // The cell is configured in the nib to draw a white highlight when clicked. 490 // The cell is configured in the nib to draw a white highlight when clicked.
491 [offTheSideCell setHighlightsBy:NSNoCellMask]; 491 [offTheSideCell setHighlightsBy:NSNoCellMask];
492 } else { 492 } else {
493 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 493 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
494 [offTheSideButton_ setImage: 494 [offTheSideButton_ setImage:
495 rb.GetNativeImageNamed(IDR_BOOKMARK_BAR_CHEVRONS).ToNSImage()]; 495 rb.GetNativeImageNamed(IDR_BOOKMARK_BAR_CHEVRONS).ToNSImage()];
496 [offTheSideButton_.draggableButton setDraggable:NO];
497 [offTheSideButton_.draggableButton setActsOnMouseDown:YES];
498 } 496 }
497 [offTheSideButton_.draggableButton setDraggable:NO];
498 [offTheSideButton_.draggableButton setActsOnMouseDown:YES];
499 499
500 // We are enabled by default. 500 // We are enabled by default.
501 barIsEnabled_ = YES; 501 barIsEnabled_ = YES;
502 502
503 // Remember the original sizes of the 'no items' and 'import bookmarks' 503 // Remember the original sizes of the 'no items' and 'import bookmarks'
504 // fields to aid in resizing when the window frame changes. 504 // fields to aid in resizing when the window frame changes.
505 originalNoItemsRect_ = [[buttonView_ noItemTextfield] frame]; 505 originalNoItemsRect_ = [[buttonView_ noItemTextfield] frame];
506 originalImportBookmarksRect_ = [[buttonView_ importBookmarksButton] frame]; 506 originalImportBookmarksRect_ = [[buttonView_ importBookmarksButton] frame];
507 if (isModeMaterial) { 507 if (isModeMaterial) {
508 // Bookmark buttons start farther from the bookmark bar's left edge so 508 // Bookmark buttons start farther from the bookmark bar's left edge so
(...skipping 2581 matching lines...) Expand 10 before | Expand all | Expand 10 after
3090 - (id<BookmarkButtonControllerProtocol>)controllerForNode: 3090 - (id<BookmarkButtonControllerProtocol>)controllerForNode:
3091 (const BookmarkNode*)node { 3091 (const BookmarkNode*)node {
3092 // See if it's in the bar, then if it is in the hierarchy of visible 3092 // See if it's in the bar, then if it is in the hierarchy of visible
3093 // folder menus. 3093 // folder menus.
3094 if (bookmarkModel_->bookmark_bar_node() == node) 3094 if (bookmarkModel_->bookmark_bar_node() == node)
3095 return self; 3095 return self;
3096 return [folderController_ controllerForNode:node]; 3096 return [folderController_ controllerForNode:node];
3097 } 3097 }
3098 3098
3099 @end 3099 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698