Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(362)

Unified Diff: chrome/browser/ui/cocoa/extensions/browser_actions_container_view.h

Issue 2629723005: [Mac] Fix bugs in resizing the browser actions area next to the omnibox. (Closed)
Patch Set: Format Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/extensions/browser_actions_container_view.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/extensions/browser_actions_container_view.h
diff --git a/chrome/browser/ui/cocoa/extensions/browser_actions_container_view.h b/chrome/browser/ui/cocoa/extensions/browser_actions_container_view.h
index 3b89f82071fe2a796fafda824ca42530922259c1..d16d55f0df426aa44a25668a050fe4abab444e2d 100644
--- a/chrome/browser/ui/cocoa/extensions/browser_actions_container_view.h
+++ b/chrome/browser/ui/cocoa/extensions/browser_actions_container_view.h
@@ -49,12 +49,6 @@ enum BrowserActionsContainerKeyAction {
BROWSER_ACTIONS_INVALID_KEY_ACTION = 3,
};
-class BrowserActionsContainerViewSizeDelegate {
- public:
- virtual CGFloat GetMaxAllowedWidth() = 0;
- virtual ~BrowserActionsContainerViewSizeDelegate() {}
-};
-
// The view that encompasses the Browser Action buttons in the toolbar and
// provides mechanisms for resizing.
@interface BrowserActionsContainerView : NSView<NSAnimationDelegate> {
@@ -62,13 +56,8 @@ class BrowserActionsContainerViewSizeDelegate {
// The frame encompasing the grippy used for resizing the container.
NSRect grippyRect_;
- // Used to cache the original position within the container that initiated the
- // drag.
- NSPoint initialDragPoint_;
-
- // The maximum width the container could want; i.e., the width required to
- // display all the icons.
- CGFloat maxDesiredWidth_;
+ // Remember where in the grippy the drag began.
+ CGFloat dragOffset_;
// Whether the container is currently being resized by the user.
BOOL userIsResizing_;
@@ -83,15 +72,6 @@ class BrowserActionsContainerViewSizeDelegate {
// app menu.
BOOL isOverflow_;
- // Whether the user is allowed to drag the grippy to the left. NO if all
- // extensions are shown or the location bar has hit its minimum width (handled
- // within toolbar_controller.mm).
- BOOL canDragLeft_;
-
- // Whether the user is allowed to drag the grippy to the right. NO if all
- // extensions are hidden.
- BOOL canDragRight_;
-
// When the left grippy is pinned, resizing the window has no effect on its
// position. This prevents it from overlapping with other elements as well
// as letting the container expand when the window is going from super small
@@ -101,10 +81,6 @@ class BrowserActionsContainerViewSizeDelegate {
// The nine-grid of the highlight to paint, if any.
std::unique_ptr<ui::NinePartImageIds> highlight_;
- // The size delegate, if any.
- // Weak; delegate is responsible for adding/removing itself.
- BrowserActionsContainerViewSizeDelegate* sizeDelegate_;
-
base::scoped_nsobject<NSViewAnimation> resizeAnimation_;
}
@@ -130,12 +106,10 @@ class BrowserActionsContainerViewSizeDelegate {
// Stops any animation in progress.
- (void)stopAnimation;
-@property(nonatomic) BOOL canDragLeft;
-@property(nonatomic) BOOL canDragRight;
+@property(nonatomic) CGFloat minWidth;
+@property(nonatomic) CGFloat maxWidth;
@property(nonatomic) BOOL grippyPinned;
-@property(nonatomic) CGFloat maxDesiredWidth;
@property(readonly, nonatomic) BOOL userIsResizing;
-@property(nonatomic) BrowserActionsContainerViewSizeDelegate* delegate;
@end
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/extensions/browser_actions_container_view.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698