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

Side by Side Diff: chrome/browser/ui/cocoa/extensions/browser_actions_container_view.h

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 unified diff | Download patch
OLDNEW
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 <memory>
11
10 #include "base/mac/scoped_nsobject.h" 12 #include "base/mac/scoped_nsobject.h"
11 #include "base/memory/scoped_ptr.h"
12 13
13 namespace ui { 14 namespace ui {
14 struct NinePartImageIds; 15 struct NinePartImageIds;
15 } 16 }
16 17
17 // Sent when a user-initiated drag to resize the container is initiated. 18 // Sent when a user-initiated drag to resize the container is initiated.
18 extern NSString* const kBrowserActionGrippyDragStartedNotification; 19 extern NSString* const kBrowserActionGrippyDragStartedNotification;
19 20
20 // Sent when a user-initiated drag is resizing the container. 21 // Sent when a user-initiated drag is resizing the container.
21 extern NSString* const kBrowserActionGrippyDraggingNotification; 22 extern NSString* const kBrowserActionGrippyDraggingNotification;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // extensions are hidden. 92 // extensions are hidden.
92 BOOL canDragRight_; 93 BOOL canDragRight_;
93 94
94 // When the left grippy is pinned, resizing the window has no effect on its 95 // When the left grippy is pinned, resizing the window has no effect on its
95 // position. This prevents it from overlapping with other elements as well 96 // position. This prevents it from overlapping with other elements as well
96 // as letting the container expand when the window is going from super small 97 // as letting the container expand when the window is going from super small
97 // to large. 98 // to large.
98 BOOL grippyPinned_; 99 BOOL grippyPinned_;
99 100
100 // The nine-grid of the highlight to paint, if any. 101 // The nine-grid of the highlight to paint, if any.
101 scoped_ptr<ui::NinePartImageIds> highlight_; 102 std::unique_ptr<ui::NinePartImageIds> highlight_;
102 103
103 // The size delegate, if any. 104 // The size delegate, if any.
104 // Weak; delegate is responsible for adding/removing itself. 105 // Weak; delegate is responsible for adding/removing itself.
105 BrowserActionsContainerViewSizeDelegate* sizeDelegate_; 106 BrowserActionsContainerViewSizeDelegate* sizeDelegate_;
106 107
107 base::scoped_nsobject<NSViewAnimation> resizeAnimation_; 108 base::scoped_nsobject<NSViewAnimation> resizeAnimation_;
108 } 109 }
109 110
110 // Sets whether or not the container is the overflow container. 111 // Sets whether or not the container is the overflow container.
111 - (void)setIsOverflow:(BOOL)isOverflow; 112 - (void)setIsOverflow:(BOOL)isOverflow;
112 113
113 // Sets whether or not the container is highlighting. 114 // Sets whether or not the container is highlighting.
114 - (void)setHighlight:(scoped_ptr<ui::NinePartImageIds>)highlight; 115 - (void)setHighlight:(std::unique_ptr<ui::NinePartImageIds>)highlight;
115 116
116 // Reeturns true if the container is currently highlighting. 117 // Reeturns true if the container is currently highlighting.
117 - (BOOL)isHighlighting; 118 - (BOOL)isHighlighting;
118 119
119 // Resizes the container to the given ideal width, optionally animating. 120 // Resizes the container to the given ideal width, optionally animating.
120 - (void)resizeToWidth:(CGFloat)width animate:(BOOL)animate; 121 - (void)resizeToWidth:(CGFloat)width animate:(BOOL)animate;
121 122
122 // Returns the frame of the container after the running animation has finished. 123 // Returns the frame of the container after the running animation has finished.
123 // If no animation is running, returns the container's current frame. 124 // If no animation is running, returns the container's current frame.
124 - (NSRect)animationEndFrame; 125 - (NSRect)animationEndFrame;
125 126
126 // Returns true if the view is animating. 127 // Returns true if the view is animating.
127 - (BOOL)isAnimating; 128 - (BOOL)isAnimating;
128 129
129 // Stops any animation in progress. 130 // Stops any animation in progress.
130 - (void)stopAnimation; 131 - (void)stopAnimation;
131 132
132 @property(nonatomic) BOOL canDragLeft; 133 @property(nonatomic) BOOL canDragLeft;
133 @property(nonatomic) BOOL canDragRight; 134 @property(nonatomic) BOOL canDragRight;
134 @property(nonatomic) BOOL grippyPinned; 135 @property(nonatomic) BOOL grippyPinned;
135 @property(nonatomic) CGFloat maxDesiredWidth; 136 @property(nonatomic) CGFloat maxDesiredWidth;
136 @property(readonly, nonatomic) BOOL userIsResizing; 137 @property(readonly, nonatomic) BOOL userIsResizing;
137 @property(nonatomic) BrowserActionsContainerViewSizeDelegate* delegate; 138 @property(nonatomic) BrowserActionsContainerViewSizeDelegate* delegate;
138 139
139 @end 140 @end
140 141
141 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTAINER_VIEW_ 142 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTAINER_VIEW_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698