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

Side by Side Diff: chrome/browser/ui/cocoa/autofill/layout_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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/autofill/layout_view.h" 5 #import "chrome/browser/ui/cocoa/autofill/layout_view.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "chrome/browser/ui/cocoa/autofill/simple_grid_layout.h" 9 #include "chrome/browser/ui/cocoa/autofill/simple_grid_layout.h"
10 10
11 @implementation LayoutView 11 @implementation LayoutView
12 12
13 - (void)setLayoutManager:(scoped_ptr<SimpleGridLayout>)layout { 13 - (void)setLayoutManager:(std::unique_ptr<SimpleGridLayout>)layout {
14 layout_ = std::move(layout); 14 layout_ = std::move(layout);
15 } 15 }
16 16
17 - (SimpleGridLayout*)layoutManager { 17 - (SimpleGridLayout*)layoutManager {
18 return layout_.get(); 18 return layout_.get();
19 } 19 }
20 20
21 - (void)resizeSubviewsWithOldSize:(NSSize)oldBoundsSize { 21 - (void)resizeSubviewsWithOldSize:(NSSize)oldBoundsSize {
22 [super resizeSubviewsWithOldSize:oldBoundsSize]; 22 [super resizeSubviewsWithOldSize:oldBoundsSize];
23 [self performLayout]; 23 [self performLayout];
24 } 24 }
25 25
26 - (void)performLayout { 26 - (void)performLayout {
27 layout_->Layout(self); 27 layout_->Layout(self);
28 } 28 }
29 29
30 - (CGFloat)preferredHeightForWidth:(CGFloat)width { 30 - (CGFloat)preferredHeightForWidth:(CGFloat)width {
31 return layout_->GetPreferredHeightForWidth(width); 31 return layout_->GetPreferredHeightForWidth(width);
32 } 32 }
33 33
34 @end 34 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/autofill/layout_view.h ('k') | chrome/browser/ui/cocoa/autofill/layout_view_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698