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

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

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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #import "chrome/browser/ui/cocoa/extensions/browser_actions_container_view.h" 5 #import "chrome/browser/ui/cocoa/extensions/browser_actions_container_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #import "chrome/browser/ui/cocoa/view_id_util.h" 10 #import "chrome/browser/ui/cocoa/view_id_util.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 134
135 DCHECK_NE(BROWSER_ACTIONS_INVALID_KEY_ACTION, action); 135 DCHECK_NE(BROWSER_ACTIONS_INVALID_KEY_ACTION, action);
136 NSDictionary* userInfo = @{ kBrowserActionsContainerKeyEventKey : @(action) }; 136 NSDictionary* userInfo = @{ kBrowserActionsContainerKeyEventKey : @(action) };
137 [[NSNotificationCenter defaultCenter] 137 [[NSNotificationCenter defaultCenter]
138 postNotificationName:kBrowserActionsContainerReceivedKeyEvent 138 postNotificationName:kBrowserActionsContainerReceivedKeyEvent
139 object:self 139 object:self
140 userInfo:userInfo]; 140 userInfo:userInfo];
141 [super keyDown:theEvent]; 141 [super keyDown:theEvent];
142 } 142 }
143 143
144 - (void)setHighlight:(scoped_ptr<ui::NinePartImageIds>)highlight { 144 - (void)setHighlight:(std::unique_ptr<ui::NinePartImageIds>)highlight {
145 if (highlight || highlight_) { 145 if (highlight || highlight_) {
146 highlight_ = std::move(highlight); 146 highlight_ = std::move(highlight);
147 // We don't allow resizing when the container is highlighting. 147 // We don't allow resizing when the container is highlighting.
148 resizable_ = highlight.get() == nullptr; 148 resizable_ = highlight.get() == nullptr;
149 [self setNeedsDisplay:YES]; 149 [self setNeedsDisplay:YES];
150 } 150 }
151 } 151 }
152 152
153 - (BOOL)isHighlighting { 153 - (BOOL)isHighlighting {
154 return highlight_.get() != nullptr; 154 return highlight_.get() != nullptr;
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 retVal = [NSCursor resizeLeftRightCursor]; 339 retVal = [NSCursor resizeLeftRightCursor];
340 } 340 }
341 return retVal; 341 return retVal;
342 } 342 }
343 343
344 - (CGFloat)maxAllowedWidth { 344 - (CGFloat)maxAllowedWidth {
345 return delegate_ ? delegate_->GetMaxAllowedWidth() : CGFLOAT_MAX; 345 return delegate_ ? delegate_->GetMaxAllowedWidth() : CGFLOAT_MAX;
346 } 346 }
347 347
348 @end 348 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698