| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/cocoa/bookmarks/bookmark_bar_controller.h" | 5 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #import "base/mac/bundle_locations.h" | 9 #import "base/mac/bundle_locations.h" |
| 10 #import "base/mac/foundation_util.h" | 10 #import "base/mac/foundation_util.h" |
| (...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 } | 461 } |
| 462 | 462 |
| 463 - (void)awakeFromNib { | 463 - (void)awakeFromNib { |
| 464 [self viewDidLoad]; | 464 [self viewDidLoad]; |
| 465 } | 465 } |
| 466 | 466 |
| 467 - (void)viewDidLoad { | 467 - (void)viewDidLoad { |
| 468 if (bridge_) { | 468 if (bridge_) { |
| 469 // When running on 10.10, expect both -awakeFromNib and -viewDidLoad to be | 469 // When running on 10.10, expect both -awakeFromNib and -viewDidLoad to be |
| 470 // called, but only initialize once. | 470 // called, but only initialize once. |
| 471 DCHECK(base::mac::IsOSYosemiteOrLater()); | 471 DCHECK(base::mac::IsAtLeastOS10_10()); |
| 472 return; | 472 return; |
| 473 } | 473 } |
| 474 | 474 |
| 475 // We default to NOT open, which means height=0. | 475 // We default to NOT open, which means height=0. |
| 476 DCHECK([[self view] isHidden]); // Hidden so it's OK to change. | 476 DCHECK([[self view] isHidden]); // Hidden so it's OK to change. |
| 477 | 477 |
| 478 // Set our initial height to zero, since that is what the superview | 478 // Set our initial height to zero, since that is what the superview |
| 479 // expects. We will resize ourselves open later if needed. | 479 // expects. We will resize ourselves open later if needed. |
| 480 [[self view] setFrame:NSMakeRect(0, 0, initialWidth_, 0)]; | 480 [[self view] setFrame:NSMakeRect(0, 0, initialWidth_, 0)]; |
| 481 | 481 |
| (...skipping 2603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3085 - (id<BookmarkButtonControllerProtocol>)controllerForNode: | 3085 - (id<BookmarkButtonControllerProtocol>)controllerForNode: |
| 3086 (const BookmarkNode*)node { | 3086 (const BookmarkNode*)node { |
| 3087 // See if it's in the bar, then if it is in the hierarchy of visible | 3087 // See if it's in the bar, then if it is in the hierarchy of visible |
| 3088 // folder menus. | 3088 // folder menus. |
| 3089 if (bookmarkModel_->bookmark_bar_node() == node) | 3089 if (bookmarkModel_->bookmark_bar_node() == node) |
| 3090 return self; | 3090 return self; |
| 3091 return [folderController_ controllerForNode:node]; | 3091 return [folderController_ controllerForNode:node]; |
| 3092 } | 3092 } |
| 3093 | 3093 |
| 3094 @end | 3094 @end |
| OLD | NEW |