OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTAINER_VIEW_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTAINER_VIEW_ |
6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTAINER_VIEW_ | 6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTAINER_VIEW_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 // Whether the user is allowed to drag the grippy to the right. NO if all | 66 // Whether the user is allowed to drag the grippy to the right. NO if all |
67 // extensions are hidden. | 67 // extensions are hidden. |
68 BOOL canDragRight_; | 68 BOOL canDragRight_; |
69 | 69 |
70 // When the left grippy is pinned, resizing the window has no effect on its | 70 // When the left grippy is pinned, resizing the window has no effect on its |
71 // position. This prevents it from overlapping with other elements as well | 71 // position. This prevents it from overlapping with other elements as well |
72 // as letting the container expand when the window is going from super small | 72 // as letting the container expand when the window is going from super small |
73 // to large. | 73 // to large. |
74 BOOL grippyPinned_; | 74 BOOL grippyPinned_; |
75 | 75 |
| 76 // Whether the toolbar is currently highlighting its actions (in which case it |
| 77 // is drawn with an orange background). |
| 78 BOOL isHighlighting_; |
| 79 |
76 // A tracking area to receive mouseEntered events, if tracking is enabled. | 80 // A tracking area to receive mouseEntered events, if tracking is enabled. |
77 ui::ScopedCrTrackingArea trackingArea_; | 81 ui::ScopedCrTrackingArea trackingArea_; |
78 | 82 |
79 // The size delegate, if any. | 83 // The size delegate, if any. |
80 // Weak; delegate is responsible for adding/removing itself. | 84 // Weak; delegate is responsible for adding/removing itself. |
81 BrowserActionsContainerViewSizeDelegate* sizeDelegate_; | 85 BrowserActionsContainerViewSizeDelegate* sizeDelegate_; |
82 | 86 |
83 base::scoped_nsobject<NSViewAnimation> resizeAnimation_; | 87 base::scoped_nsobject<NSViewAnimation> resizeAnimation_; |
84 } | 88 } |
85 | 89 |
86 // Sets whether or not tracking (for mouseEntered events) is enabled. | 90 // Sets whether or not tracking (for mouseEntered events) is enabled. |
87 - (void)setTrackingEnabled:(BOOL)enabled; | 91 - (void)setTrackingEnabled:(BOOL)enabled; |
88 | 92 |
| 93 // Sets whether or not the container is highlighting. |
| 94 - (void)setIsHighlighting:(BOOL)isHighlighting; |
| 95 |
89 // Resizes the container to the given ideal width, optionally animating. | 96 // Resizes the container to the given ideal width, optionally animating. |
90 - (void)resizeToWidth:(CGFloat)width animate:(BOOL)animate; | 97 - (void)resizeToWidth:(CGFloat)width animate:(BOOL)animate; |
91 | 98 |
92 // Returns the frame of the container after the running animation has finished. | 99 // Returns the frame of the container after the running animation has finished. |
93 // If no animation is running, returns the container's current frame. | 100 // If no animation is running, returns the container's current frame. |
94 - (NSRect)animationEndFrame; | 101 - (NSRect)animationEndFrame; |
95 | 102 |
96 // Returns true if the view is animating. | 103 // Returns true if the view is animating. |
97 - (BOOL)isAnimating; | 104 - (BOOL)isAnimating; |
98 | 105 |
99 // Stops any animation in progress. | 106 // Stops any animation in progress. |
100 - (void)stopAnimation; | 107 - (void)stopAnimation; |
101 | 108 |
102 @property(nonatomic) BOOL canDragLeft; | 109 @property(nonatomic) BOOL canDragLeft; |
103 @property(nonatomic) BOOL canDragRight; | 110 @property(nonatomic) BOOL canDragRight; |
104 @property(nonatomic) BOOL grippyPinned; | 111 @property(nonatomic) BOOL grippyPinned; |
105 @property(nonatomic,getter=isResizable) BOOL resizable; | 112 @property(nonatomic,getter=isResizable) BOOL resizable; |
106 @property(nonatomic) CGFloat maxDesiredWidth; | 113 @property(nonatomic) CGFloat maxDesiredWidth; |
107 @property(readonly, nonatomic) BOOL userIsResizing; | 114 @property(readonly, nonatomic) BOOL userIsResizing; |
108 @property(nonatomic) BrowserActionsContainerViewSizeDelegate* delegate; | 115 @property(nonatomic) BrowserActionsContainerViewSizeDelegate* delegate; |
109 | 116 |
110 @end | 117 @end |
111 | 118 |
112 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTAINER_VIEW_ | 119 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTAINER_VIEW_ |
OLD | NEW |