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#ifndef CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_STATE_H_ 6#define CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_STATE_H_ 7 8#import <Cocoa/Cocoa.h> 9 10#include "chrome/browser/ui/bookmarks/bookmark_bar.h" 11 12// The interface for controllers (etc.) which can give information about the 13// bookmark bar's state. 14@protocol BookmarkBarState 15 16// Returns YES if the bookmark bar is currently visible (as a normal toolbar or 17// as a detached bar on the NTP), NO otherwise. 18- (BOOL)isVisible; 19 20// Returns YES if an animation is currently running, NO otherwise. 21- (BOOL)isAnimationRunning; 22 23// Returns YES if the bookmark bar is in the given state and not in an 24// animation, NO otherwise. 25- (BOOL)isInState:(BookmarkBar::State)state; 26 27// Returns YES if the bookmark bar is animating from the given state (to any 28// other state), NO otherwise. 29- (BOOL)isAnimatingToState:(BookmarkBar::State)state; 30 31// Returns YES if the bookmark bar is animating to the given state (from any 32// other state), NO otherwise. 33- (BOOL)isAnimatingFromState:(BookmarkBar::State)state; 34 35// Returns YES if the bookmark bar is animating from the first given state to 36// the second given state, NO otherwise. 37- (BOOL)isAnimatingFromState:(BookmarkBar::State)fromState 38 toState:(BookmarkBar::State)toState; 39 40// Returns YES if the bookmark bar is animating between the two given states (in 41// either direction), NO otherwise. 42- (BOOL)isAnimatingBetweenState:(BookmarkBar::State)fromState 43 andState:(BookmarkBar::State)toState; 44 45// Returns how morphed into the detached bubble the bookmark bar should be (1 = 46// completely detached, 0 = normal). 47- (CGFloat)detachedMorphProgress; 48 49@end 50 51#endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_STATE_H_ 52