| 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 // The BookmarkBarToolbarView is responsible for drawing the background of the | 5 // The BookmarkBarToolbarView is responsible for drawing the background of the |
| 6 // BookmarkBar's toolbar in either of its two display modes - permanently | 6 // BookmarkBar's toolbar in either of its two display modes - permanently |
| 7 // attached (slimline with a stroke at the bottom edge) or New Tab Page style | 7 // attached (slimline with a stroke at the bottom edge) or New Tab Page style |
| 8 // (padded with a round rect border and the New Tab Page theme behind). | 8 // (padded with a round rect border and the New Tab Page theme behind). |
| 9 | 9 |
| 10 #ifndef CHROME_BROWSER_COCOA_BOOKMARK_BAR_TOOLBAR_VIEW_H_ | 10 #ifndef CHROME_BROWSER_COCOA_BOOKMARK_BAR_TOOLBAR_VIEW_H_ |
| 11 #define CHROME_BROWSER_COCOA_BOOKMARK_BAR_TOOLBAR_VIEW_H_ | 11 #define CHROME_BROWSER_COCOA_BOOKMARK_BAR_TOOLBAR_VIEW_H_ |
| 12 | 12 |
| 13 #import <Cocoa/Cocoa.h> | 13 #import <Cocoa/Cocoa.h> |
| 14 | 14 |
| 15 #import "chrome/browser/cocoa/background_gradient_view.h" | 15 #import "chrome/browser/cocoa/animatable_view.h" |
| 16 | 16 |
| 17 @protocol BookmarkBarFloating; | |
| 18 @class BookmarkBarView; | 17 @class BookmarkBarView; |
| 19 class TabContents; | 18 class TabContents; |
| 20 class ThemeProvider; | 19 class ThemeProvider; |
| 21 | 20 |
| 22 // An interface to allow mocking of a BookmarkBarController by the | 21 // An interface to allow mocking of a BookmarkBarController by the |
| 23 // BookmarkBarToolbarView. | 22 // BookmarkBarToolbarView. |
| 24 @protocol BookmarkBarToolbarViewController | 23 @protocol BookmarkBarToolbarViewController |
| 25 // Displaying the bookmark toolbar background in floating mode requires the | 24 // Displaying the bookmark toolbar background in bubble (floating) mode requires |
| 26 // size of the currently selected tab to properly calculate where the | 25 // the size of the currently selected tab to properly calculate where the |
| 27 // background image is joined. | 26 // background image is joined. |
| 28 - (int)currentTabContentsHeight; | 27 - (int)currentTabContentsHeight; |
| 29 | 28 |
| 30 // Current theme provider, passed to the cross platform NtpBackgroundUtil class. | 29 // Current theme provider, passed to the cross platform NtpBackgroundUtil class. |
| 31 - (ThemeProvider*)themeProvider; | 30 - (ThemeProvider*)themeProvider; |
| 32 | 31 |
| 33 // Returns true if the bookmark bar should be drawn as if it's a disconnected | 32 // Returns true if the bookmark bar should be drawn as if it's a disconnected |
| 34 // bookmark bar on the New Tag Page. | 33 // bookmark bar on the New Tag Page. |
| 35 - (BOOL)drawAsFloatingBar; | 34 - (BOOL)isShownAsDetachedBar; |
| 36 | 35 |
| 37 @end | 36 @end |
| 38 | 37 |
| 39 @interface BookmarkBarToolbarView : BackgroundGradientView { | 38 @interface BookmarkBarToolbarView : AnimatableView { |
| 40 @private | 39 @private |
| 41 // The controller which tells us how we should be drawing (as normal or as a | 40 // The controller which tells us how we should be drawing (as normal or as a |
| 42 // floating bar). | 41 // floating bar). |
| 43 IBOutlet id<BookmarkBarToolbarViewController> controller_; | 42 IBOutlet id<BookmarkBarToolbarViewController> controller_; |
| 44 } | 43 } |
| 45 @end | 44 @end |
| 46 | 45 |
| 47 #endif // CHROME_BROWSER_COCOA_BOOKMARK_BAR_TOOLBAR_VIEW_H_ | 46 #endif // CHROME_BROWSER_COCOA_BOOKMARK_BAR_TOOLBAR_VIEW_H_ |
| OLD | NEW |