| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |