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_controller.h" | 5 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" |
6 | 6 |
7 #include "app/l10n_util_mac.h" | 7 #include "app/l10n_util_mac.h" |
8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
9 #include "base/mac_util.h" | 9 #include "base/mac/mac_util.h" |
10 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
11 #include "chrome/browser/bookmarks/bookmark_editor.h" | 11 #include "chrome/browser/bookmarks/bookmark_editor.h" |
12 #include "chrome/browser/bookmarks/bookmark_model.h" | 12 #include "chrome/browser/bookmarks/bookmark_model.h" |
13 #include "chrome/browser/bookmarks/bookmark_utils.h" | 13 #include "chrome/browser/bookmarks/bookmark_utils.h" |
14 #include "chrome/browser/metrics/user_metrics.h" | 14 #include "chrome/browser/metrics/user_metrics.h" |
15 #include "chrome/browser/prefs/pref_service.h" | 15 #include "chrome/browser/prefs/pref_service.h" |
16 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
17 #include "chrome/browser/tab_contents/tab_contents.h" | 17 #include "chrome/browser/tab_contents/tab_contents.h" |
18 #include "chrome/browser/tab_contents/tab_contents_view.h" | 18 #include "chrome/browser/tab_contents/tab_contents_view.h" |
19 #import "chrome/browser/themes/browser_theme_provider.h" | 19 #import "chrome/browser/themes/browser_theme_provider.h" |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 | 204 |
205 @synthesize visualState = visualState_; | 205 @synthesize visualState = visualState_; |
206 @synthesize lastVisualState = lastVisualState_; | 206 @synthesize lastVisualState = lastVisualState_; |
207 @synthesize delegate = delegate_; | 207 @synthesize delegate = delegate_; |
208 | 208 |
209 - (id)initWithBrowser:(Browser*)browser | 209 - (id)initWithBrowser:(Browser*)browser |
210 initialWidth:(float)initialWidth | 210 initialWidth:(float)initialWidth |
211 delegate:(id<BookmarkBarControllerDelegate>)delegate | 211 delegate:(id<BookmarkBarControllerDelegate>)delegate |
212 resizeDelegate:(id<ViewResizer>)resizeDelegate { | 212 resizeDelegate:(id<ViewResizer>)resizeDelegate { |
213 if ((self = [super initWithNibName:@"BookmarkBar" | 213 if ((self = [super initWithNibName:@"BookmarkBar" |
214 bundle:mac_util::MainAppBundle()])) { | 214 bundle:base::mac::MainAppBundle()])) { |
215 // Initialize to an invalid state. | 215 // Initialize to an invalid state. |
216 visualState_ = bookmarks::kInvalidState; | 216 visualState_ = bookmarks::kInvalidState; |
217 lastVisualState_ = bookmarks::kInvalidState; | 217 lastVisualState_ = bookmarks::kInvalidState; |
218 | 218 |
219 browser_ = browser; | 219 browser_ = browser; |
220 initialWidth_ = initialWidth; | 220 initialWidth_ = initialWidth; |
221 bookmarkModel_ = browser_->profile()->GetBookmarkModel(); | 221 bookmarkModel_ = browser_->profile()->GetBookmarkModel(); |
222 buttons_.reset([[NSMutableArray alloc] init]); | 222 buttons_.reset([[NSMutableArray alloc] init]); |
223 delegate_ = delegate; | 223 delegate_ = delegate; |
224 resizeDelegate_ = resizeDelegate; | 224 resizeDelegate_ = resizeDelegate; |
(...skipping 2263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2488 // to minimize touching the object passed in (likely a mock). | 2488 // to minimize touching the object passed in (likely a mock). |
2489 - (void)setButtonContextMenu:(id)menu { | 2489 - (void)setButtonContextMenu:(id)menu { |
2490 buttonContextMenu_ = menu; | 2490 buttonContextMenu_ = menu; |
2491 } | 2491 } |
2492 | 2492 |
2493 - (void)setIgnoreAnimations:(BOOL)ignore { | 2493 - (void)setIgnoreAnimations:(BOOL)ignore { |
2494 ignoreAnimations_ = ignore; | 2494 ignoreAnimations_ = ignore; |
2495 } | 2495 } |
2496 | 2496 |
2497 @end | 2497 @end |
OLD | NEW |