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

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

Issue 209004: Use delegate protocols present in the 10.6 SDK (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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 | Annotate | Revision Log
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 #include "base/mac_util.h" 5 #include "base/mac_util.h"
6 #include "base/sys_string_conversions.h" 6 #include "base/sys_string_conversions.h"
7 #include "chrome/browser/bookmarks/bookmark_editor.h" 7 #include "chrome/browser/bookmarks/bookmark_editor.h"
8 #include "chrome/browser/bookmarks/bookmark_model.h" 8 #include "chrome/browser/bookmarks/bookmark_model.h"
9 #include "chrome/browser/browser.h" 9 #include "chrome/browser/browser.h"
10 #include "chrome/browser/browser_list.h" 10 #include "chrome/browser/browser_list.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 // Disabling the bar; hide if visible. 177 // Disabling the bar; hide if visible.
178 if ([self isBookmarkBarVisible]) { 178 if ([self isBookmarkBarVisible]) {
179 [self showBookmarkBar:NO immediately:YES]; 179 [self showBookmarkBar:NO immediately:YES];
180 } 180 }
181 barIsEnabled_ = NO; 181 barIsEnabled_ = NO;
182 } 182 }
183 } 183 }
184 184
185 // Return nil if menuItem has no delegate. 185 // Return nil if menuItem has no delegate.
186 - (BookmarkNode*)nodeFromMenuItem:(id)menuItem { 186 - (BookmarkNode*)nodeFromMenuItem:(id)menuItem {
187 NSCell* cell = [[menuItem menu] delegate]; 187 NSCell* cell = reinterpret_cast<NSCell*>([[menuItem menu] delegate]);
188 if (!cell) 188 if (!cell)
189 return nil; 189 return nil;
190 BookmarkNode* node = static_cast<BookmarkNode*>( 190 BookmarkNode* node = static_cast<BookmarkNode*>(
191 [[cell representedObject] pointerValue]); 191 [[cell representedObject] pointerValue]);
192 return node; 192 return node;
193 } 193 }
194 194
195 - (BookmarkNode*)nodeFromButton:(id)button { 195 - (BookmarkNode*)nodeFromButton:(id)button {
196 NSCell* cell = [button cell]; 196 NSCell* cell = [button cell];
197 BookmarkNode* node = static_cast<BookmarkNode*>( 197 BookmarkNode* node = static_cast<BookmarkNode*>(
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 657
658 - (void)setUrlDelegate:(id<BookmarkURLOpener>)urlDelegate { 658 - (void)setUrlDelegate:(id<BookmarkURLOpener>)urlDelegate {
659 urlDelegate_ = urlDelegate; 659 urlDelegate_ = urlDelegate;
660 } 660 }
661 661
662 - (NSArray*)buttons { 662 - (NSArray*)buttons {
663 return buttons_.get(); 663 return buttons_.get();
664 } 664 }
665 665
666 @end 666 @end
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/autocomplete_text_field_unittest.mm ('k') | chrome/browser/cocoa/bookmark_bubble_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698