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