bookmark_bar_toolbar_view.h revision 72a454cd3513ac24fbdd0e0cb9ad70b86a99b801
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 3// found in the LICENSE file. 4 5// The BookmarkBarToolbarView is responsible for drawing the background of the 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 8// (padded with a round rect border and the New Tab Page theme behind). 9 10#ifndef CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_TOOLBAR_VIEW_H_ 11#define CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_TOOLBAR_VIEW_H_ 12#pragma once 13 14#import <Cocoa/Cocoa.h> 15 16#import "chrome/browser/ui/cocoa/animatable_view.h" 17#import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_state.h" 18 19@class BookmarkBarView; 20class TabContents; 21 22namespace ui { 23class ThemeProvider; 24} 25 26// An interface to allow mocking of a BookmarkBarController by the 27// BookmarkBarToolbarView. 28@protocol BookmarkBarToolbarViewController <BookmarkBarState> 29// Displaying the bookmark toolbar background in bubble (floating) mode requires 30// the size of the currently selected tab to properly calculate where the 31// background image is joined. 32- (int)currentTabContentsHeight; 33 34// Current theme provider, passed to the cross platform NtpBackgroundUtil class. 35- (ui::ThemeProvider*)themeProvider; 36 37@end 38 39@interface BookmarkBarToolbarView : AnimatableView { 40 @private 41 // The controller which tells us how we should be drawing (as normal or as a 42 // floating bar). 43 IBOutlet id<BookmarkBarToolbarViewController> controller_; 44} 45@end 46 47#endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_TOOLBAR_VIEW_H_ 48