summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm2
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_button_cell.mm6
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.h4
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.mm4
4 files changed, 13 insertions, 3 deletions
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
index ce7e1c0..c8156d0 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
@@ -615,7 +615,7 @@ void RecordAppLaunch(Profile* profile, GURL url) {
}
- (IBAction)openBookmark:(id)sender {
- BOOL isMenuItem = ([sender delegate] == folderController_);
+ BOOL isMenuItem = [[sender cell] isFolderButtonCell];
BOOL animate = isMenuItem && [self animationEnabled];
if (animate)
[self doMenuFlashOnSeparateThread:sender];
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_button_cell.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_button_cell.mm
index c03500d..677d1e4 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_button_cell.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_button_cell.mm
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -19,4 +19,8 @@
return buttonCell;
}
+- (BOOL)isFolderButtonCell {
+ return YES;
+}
+
@end
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.h b/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.h
index dbcff34..cce3302 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.h
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -60,6 +60,8 @@ class BookmarkNode;
// Set the color of text in this cell.
- (void)setTextColor:(NSColor*)color;
+- (BOOL)isFolderButtonCell;
+
@end
#endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BUTTON_CELL_H_
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.mm
index 294c0f9..0f21ed5 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.mm
@@ -72,6 +72,10 @@
[self configureBookmarkButtonCell];
}
+- (BOOL)isFolderButtonCell {
+ return NO;
+}
+
// Perform all normal init routines specific to the BookmarkButtonCell.
- (void)configureBookmarkButtonCell {
[self setButtonType:NSMomentaryPushInButton];