1// Copyright (c) 2012 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_VIEW_RESIZER_H_
6#define CHROME_BROWSER_UI_COCOA_VIEW_RESIZER_H_
7
8#include "chrome/browser/ui/tabs/tab_strip_model.h"
9
10#import <Cocoa/Cocoa.h>
11
12// Defines a protocol that allows controllers to delegate resizing their views
13// to their parents.  When a controller needs to change a view's height, rather
14// than resizing it directly, it sends a message to its parent asking the parent
15// to perform the resize.  This allows the parent to do any re-layout that may
16// become necessary due to the resize.
17@protocol ViewResizer <NSObject>
18- (void)resizeView:(NSView*)view newHeight:(CGFloat)height;
19
20@optional
21// Optional method called when an animation is beginning or ending.  Resize
22// delegates can implement this method if they need to modify their behavior
23// while an animation is running.
24- (void)setAnimationInProgress:(BOOL)inProgress;
25@end
26
27#endif  // CHROME_BROWSER_UI_COCOA_VIEW_RESIZER_H_
28