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

Unified Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm

Issue 7462018: [Mac] "Refactor" DraggableButton into a mixin and impl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
index d8b1ab92974f3a7a85706217c1f259e72b931f19..b9fcf6f117a40adaaf120c58ac56d69e08ab2687 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
@@ -337,8 +337,8 @@ void RecordAppLaunch(Profile* profile, GURL url) {
[[self view] setFrame:NSMakeRect(0, 0, initialWidth_, 0)];
// Complete init of the "off the side" button, as much as we can.
- [offTheSideButton_ setDraggable:NO];
- [offTheSideButton_ setActsOnMouseDown:YES];
+ [offTheSideButton_.draggableButton setDraggable:NO];
+ [offTheSideButton_.draggableButton setActsOnMouseDown:YES];
// We are enabled by default.
barIsEnabled_ = YES;
@@ -1116,7 +1116,7 @@ void RecordAppLaunch(Profile* profile, GURL url) {
if (node->is_folder()) {
[button setTarget:self];
[button setAction:@selector(openBookmarkFolderFromButton:)];
- [button setActsOnMouseDown:YES];
+ [[button draggableButton] setActsOnMouseDown:YES];
// If it has a title, and it will be truncated, show full title in
// tooltip.
NSString* title = base::SysUTF16ToNSString(node->GetTitle());
@@ -1194,8 +1194,8 @@ void RecordAppLaunch(Profile* profile, GURL url) {
frame.origin.x = [[self buttonView] bounds].size.width - frame.size.width;
frame.origin.x -= bookmarks::kBookmarkHorizontalPadding;
BookmarkButton* button = [[BookmarkButton alloc] initWithFrame:frame];
- [button setDraggable:NO];
- [button setActsOnMouseDown:YES];
+ [[button draggableButton] setDraggable:NO];
+ [[button draggableButton] setActsOnMouseDown:YES];
otherBookmarksButton_.reset(button);
view_id_util::SetID(button, VIEW_ID_OTHER_BOOKMARKS);

Powered by Google App Engine
This is Rietveld 408576698