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

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

Issue 2857015: Clang/mac: Get unit_tests built. (Closed)
Patch Set: rebase Created 10 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/cocoa/bookmark_bar_controller.h" 5 #import "chrome/browser/cocoa/bookmark_bar_controller.h"
6 #include "app/l10n_util_mac.h" 6 #include "app/l10n_util_mac.h"
7 #include "app/resource_bundle.h" 7 #include "app/resource_bundle.h"
8 #include "base/mac_util.h" 8 #include "base/mac_util.h"
9 #include "base/sys_string_conversions.h" 9 #include "base/sys_string_conversions.h"
10 #include "chrome/browser/bookmarks/bookmark_editor.h" 10 #include "chrome/browser/bookmarks/bookmark_editor.h"
(...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 } else { 781 } else {
782 // Oops! An animation we don't know how to handle. 782 // Oops! An animation we don't know how to handle.
783 return NO; 783 return NO;
784 } 784 }
785 785
786 return YES; 786 return YES;
787 } 787 }
788 788
789 // Enable or disable items. We are the menu delegate for both the bar 789 // Enable or disable items. We are the menu delegate for both the bar
790 // and for bookmark folder buttons. 790 // and for bookmark folder buttons.
791 - (BOOL)validateUserInterfaceItem:(id)item { 791 - (BOOL)validateUserInterfaceItem:(id<NSValidatedUserInterfaceItem>)anItem {
792 NSMenuItem* item = (NSMenuItem*)anItem; // FIXME: clang wants this.
792 // Yes for everything we don't explicitly deny. 793 // Yes for everything we don't explicitly deny.
793 if (![item isKindOfClass:[NSMenuItem class]]) 794 if (![item isKindOfClass:[NSMenuItem class]])
794 return YES; 795 return YES;
795 796
796 // Yes if we're not a special BookmarkMenu. 797 // Yes if we're not a special BookmarkMenu.
797 if (![[item menu] isKindOfClass:[BookmarkMenu class]]) 798 if (![[item menu] isKindOfClass:[BookmarkMenu class]])
798 return YES; 799 return YES;
799 800
800 // No if we think it's a special BookmarkMenu but have trouble. 801 // No if we think it's a special BookmarkMenu but have trouble.
801 const BookmarkNode* node = [self nodeFromMenuItem:item]; 802 const BookmarkNode* node = [self nodeFromMenuItem:item];
(...skipping 1537 matching lines...) Expand 10 before | Expand all | Expand 10 after
2339 // to minimize touching the object passed in (likely a mock). 2340 // to minimize touching the object passed in (likely a mock).
2340 - (void)setButtonContextMenu:(id)menu { 2341 - (void)setButtonContextMenu:(id)menu {
2341 buttonContextMenu_ = menu; 2342 buttonContextMenu_ = menu;
2342 } 2343 }
2343 2344
2344 - (void)setIgnoreAnimations:(BOOL)ignore { 2345 - (void)setIgnoreAnimations:(BOOL)ignore {
2345 ignoreAnimations_ = ignore; 2346 ignoreAnimations_ = ignore;
2346 } 2347 }
2347 2348
2348 @end 2349 @end
OLDNEW
« no previous file with comments | « chrome/browser/autofill/form_structure_unittest.cc ('k') | chrome/browser/cocoa/bookmark_bubble_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698