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/cocoa/bookmarks/bookmark_bar_controller.h" | 5 #import "chrome/browser/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_util.h" |
10 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
(...skipping 1952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1963 if ([self isAnimatingFromState:bookmarks::kDetachedState]) { | 1963 if ([self isAnimatingFromState:bookmarks::kDetachedState]) { |
1964 return static_cast<CGFloat>( | 1964 return static_cast<CGFloat>( |
1965 1 - [[self animatableView] currentAnimationProgress]); | 1965 1 - [[self animatableView] currentAnimationProgress]); |
1966 } | 1966 } |
1967 return 0; | 1967 return 0; |
1968 } | 1968 } |
1969 | 1969 |
1970 #pragma mark BookmarkBarToolbarViewController Protocol | 1970 #pragma mark BookmarkBarToolbarViewController Protocol |
1971 | 1971 |
1972 - (int)currentTabContentsHeight { | 1972 - (int)currentTabContentsHeight { |
1973 return browser_->GetSelectedTabContents() ? | 1973 TabContents* tc = browser_->GetSelectedTabContents(); |
1974 browser_->GetSelectedTabContents()->view()->GetContainerSize().height() : | 1974 return tc ? tc->view()->GetContainerSize().height() : 0; |
1975 0; | |
1976 } | 1975 } |
1977 | 1976 |
1978 - (ThemeProvider*)themeProvider { | 1977 - (ThemeProvider*)themeProvider { |
1979 return browser_->profile()->GetThemeProvider(); | 1978 return browser_->profile()->GetThemeProvider(); |
1980 } | 1979 } |
1981 | 1980 |
1982 #pragma mark BookmarkButtonDelegate Protocol | 1981 #pragma mark BookmarkButtonDelegate Protocol |
1983 | 1982 |
1984 - (void)fillPasteboard:(NSPasteboard*)pboard | 1983 - (void)fillPasteboard:(NSPasteboard*)pboard |
1985 forDragOfButton:(BookmarkButton*)button { | 1984 forDragOfButton:(BookmarkButton*)button { |
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2489 // to minimize touching the object passed in (likely a mock). | 2488 // to minimize touching the object passed in (likely a mock). |
2490 - (void)setButtonContextMenu:(id)menu { | 2489 - (void)setButtonContextMenu:(id)menu { |
2491 buttonContextMenu_ = menu; | 2490 buttonContextMenu_ = menu; |
2492 } | 2491 } |
2493 | 2492 |
2494 - (void)setIgnoreAnimations:(BOOL)ignore { | 2493 - (void)setIgnoreAnimations:(BOOL)ignore { |
2495 ignoreAnimations_ = ignore; | 2494 ignoreAnimations_ = ignore; |
2496 } | 2495 } |
2497 | 2496 |
2498 @end | 2497 @end |
OLD | NEW |