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

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

Issue 2035843003: [Mac][Material Design] Fix regression allowing chevron button dragging. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 // Complete init of the "off the side" button, as much as we can. 483 // Complete init of the "off the side" button, as much as we can.
484 if (isModeMaterial) { 484 if (isModeMaterial) {
485 [offTheSideButton_ setImage:[self offTheSideButtonImage:NO]]; 485 [offTheSideButton_ setImage:[self offTheSideButtonImage:NO]];
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 } else { 489 } else {
490 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 490 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
491 [offTheSideButton_ setImage: 491 [offTheSideButton_ setImage:
492 rb.GetNativeImageNamed(IDR_BOOKMARK_BAR_CHEVRONS).ToNSImage()]; 492 rb.GetNativeImageNamed(IDR_BOOKMARK_BAR_CHEVRONS).ToNSImage()];
493 [offTheSideButton_.draggableButton setDraggable:NO];
494 [offTheSideButton_.draggableButton setActsOnMouseDown:YES];
495 } 493 }
494 [offTheSideButton_.draggableButton setDraggable:NO];
495 [offTheSideButton_.draggableButton setActsOnMouseDown:YES];
496 496
497 // We are enabled by default. 497 // We are enabled by default.
498 barIsEnabled_ = YES; 498 barIsEnabled_ = YES;
499 499
500 // Remember the original sizes of the 'no items' and 'import bookmarks' 500 // Remember the original sizes of the 'no items' and 'import bookmarks'
501 // fields to aid in resizing when the window frame changes. 501 // fields to aid in resizing when the window frame changes.
502 originalNoItemsRect_ = [[buttonView_ noItemTextfield] frame]; 502 originalNoItemsRect_ = [[buttonView_ noItemTextfield] frame];
503 originalImportBookmarksRect_ = [[buttonView_ importBookmarksButton] frame]; 503 originalImportBookmarksRect_ = [[buttonView_ importBookmarksButton] frame];
504 if (isModeMaterial) { 504 if (isModeMaterial) {
505 // Bookmark buttons start farther from the bookmark bar's left edge so 505 // Bookmark buttons start farther from the bookmark bar's left edge so
(...skipping 2576 matching lines...) Expand 10 before | Expand all | Expand 10 after
3082 - (id<BookmarkButtonControllerProtocol>)controllerForNode: 3082 - (id<BookmarkButtonControllerProtocol>)controllerForNode:
3083 (const BookmarkNode*)node { 3083 (const BookmarkNode*)node {
3084 // See if it's in the bar, then if it is in the hierarchy of visible 3084 // See if it's in the bar, then if it is in the hierarchy of visible
3085 // folder menus. 3085 // folder menus.
3086 if (bookmarkModel_->bookmark_bar_node() == node) 3086 if (bookmarkModel_->bookmark_bar_node() == node)
3087 return self; 3087 return self;
3088 return [folderController_ controllerForNode:node]; 3088 return [folderController_ controllerForNode:node];
3089 } 3089 }
3090 3090
3091 @end 3091 @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