OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_folder_controller.h" | 5 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.h" |
6 | 6 |
7 #include "app/mac/nsimage_cache.h" | 7 #include "app/mac/nsimage_cache.h" |
8 #include "base/mac_util.h" | 8 #include "base/mac/mac_util.h" |
9 #include "base/sys_string_conversions.h" | 9 #include "base/sys_string_conversions.h" |
10 #include "chrome/browser/bookmarks/bookmark_model.h" | 10 #include "chrome/browser/bookmarks/bookmark_model.h" |
11 #include "chrome/browser/bookmarks/bookmark_utils.h" | 11 #include "chrome/browser/bookmarks/bookmark_utils.h" |
12 #import "chrome/browser/themes/browser_theme_provider.h" | 12 #import "chrome/browser/themes/browser_theme_provider.h" |
13 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_constants.h" | 13 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_constants.h" |
14 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" | 14 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" |
15 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_button_cell.h" | 15 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_button_cell.h" |
16 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_hover_state.h" | 16 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_hover_state.h" |
17 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_view.h" | 17 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_view.h" |
18 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_folder_target.h" | 18 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_folder_target.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 @end | 107 @end |
108 | 108 |
109 @implementation BookmarkBarFolderController | 109 @implementation BookmarkBarFolderController |
110 | 110 |
111 @synthesize subFolderGrowthToRight = subFolderGrowthToRight_; | 111 @synthesize subFolderGrowthToRight = subFolderGrowthToRight_; |
112 | 112 |
113 - (id)initWithParentButton:(BookmarkButton*)button | 113 - (id)initWithParentButton:(BookmarkButton*)button |
114 parentController:(BookmarkBarFolderController*)parentController | 114 parentController:(BookmarkBarFolderController*)parentController |
115 barController:(BookmarkBarController*)barController { | 115 barController:(BookmarkBarController*)barController { |
116 NSString* nibPath = | 116 NSString* nibPath = |
117 [mac_util::MainAppBundle() pathForResource:@"BookmarkBarFolderWindow" | 117 [base::mac::MainAppBundle() pathForResource:@"BookmarkBarFolderWindow" |
118 ofType:@"nib"]; | 118 ofType:@"nib"]; |
119 if ((self = [super initWithWindowNibPath:nibPath owner:self])) { | 119 if ((self = [super initWithWindowNibPath:nibPath owner:self])) { |
120 parentButton_.reset([button retain]); | 120 parentButton_.reset([button retain]); |
121 | 121 |
122 // We want the button to remain bordered as part of the menu path. | 122 // We want the button to remain bordered as part of the menu path. |
123 [button forceButtonBorderToStayOnAlways:YES]; | 123 [button forceButtonBorderToStayOnAlways:YES]; |
124 | 124 |
125 parentController_.reset([parentController retain]); | 125 parentController_.reset([parentController retain]); |
126 if (!parentController_) | 126 if (!parentController_) |
127 [self setSubFolderGrowthToRight:YES]; | 127 [self setSubFolderGrowthToRight:YES]; |
(...skipping 1322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1450 | 1450 |
1451 - (void)setIgnoreAnimations:(BOOL)ignore { | 1451 - (void)setIgnoreAnimations:(BOOL)ignore { |
1452 ignoreAnimations_ = ignore; | 1452 ignoreAnimations_ = ignore; |
1453 } | 1453 } |
1454 | 1454 |
1455 - (BookmarkButton*)buttonThatMouseIsIn { | 1455 - (BookmarkButton*)buttonThatMouseIsIn { |
1456 return buttonThatMouseIsIn_; | 1456 return buttonThatMouseIsIn_; |
1457 } | 1457 } |
1458 | 1458 |
1459 @end // BookmarkBarFolderController | 1459 @end // BookmarkBarFolderController |
OLD | NEW |