15821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Copyright (c) 2012 The Chromium Authors. All rights reserved. 25821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 35821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// found in the LICENSE file. 45821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 55821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// The BookmarkBarToolbarView is responsible for drawing the background of the 65821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// BookmarkBar's toolbar in either of its two display modes - permanently 75821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// attached (slimline with a stroke at the bottom edge) or New Tab Page style 85821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// (padded with a round rect border and the New Tab Page theme behind). 95821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#ifndef CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_TOOLBAR_VIEW_H_ 115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_TOOLBAR_VIEW_H_ 125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#import <Cocoa/Cocoa.h> 145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#import "chrome/browser/ui/cocoa/animatable_view.h" 165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_state.h" 175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)@class BookmarkBarView; 195821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 20b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)class ThemeService; 215821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// An interface to allow mocking of a BookmarkBarController by the 235821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// BookmarkBarToolbarView. 245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)@protocol BookmarkBarToolbarViewController <BookmarkBarState> 255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Displaying the bookmark toolbar background in bubble (floating) mode requires 265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// the size of the currently selected tab to properly calculate where the 275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// background image is joined. 285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)- (int)currentTabContentsHeight; 295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 30116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch// Current theme service. 31b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)- (ThemeService*)themeService; 325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)@end 345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)@interface BookmarkBarToolbarView : AnimatableView { 365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) @private 375821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // The controller which tells us how we should be drawing (as normal or as a 385821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // floating bar). 395821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) IBOutlet id<BookmarkBarToolbarViewController> controller_; 405821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)} 415821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)@end 425821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 435821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_TOOLBAR_VIEW_H_ 44