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

Side by Side Diff: chrome/browser/ui/cocoa/website_settings/split_block_button.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/website_settings/split_block_button.h" 5 #import "chrome/browser/ui/cocoa/website_settings/split_block_button.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/mac/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 @interface SplitButtonTitleCell : ConstrainedWindowButtonCell 88 @interface SplitButtonTitleCell : ConstrainedWindowButtonCell
89 - (NSRect)rect; 89 - (NSRect)rect;
90 @end 90 @end
91 91
92 // A button cell used by SplitBlockButton, containing the popup menu. 92 // A button cell used by SplitBlockButton, containing the popup menu.
93 @interface SplitButtonPopUpCell : 93 @interface SplitButtonPopUpCell :
94 NSPopUpButtonCell<ConstrainedWindowButtonDrawableCell> { 94 NSPopUpButtonCell<ConstrainedWindowButtonDrawableCell> {
95 @private 95 @private
96 BOOL isMouseInside_; 96 BOOL isMouseInside_;
97 base::scoped_nsobject<MenuController> menuController_; 97 base::scoped_nsobject<MenuController> menuController_;
98 scoped_ptr<ui::SimpleMenuModel> menuModel_; 98 std::unique_ptr<ui::SimpleMenuModel> menuModel_;
99 } 99 }
100 100
101 // Designated initializer. 101 // Designated initializer.
102 - (id)initWithMenuDelegate:(ui::SimpleMenuModel::Delegate*)menuDelegate; 102 - (id)initWithMenuDelegate:(ui::SimpleMenuModel::Delegate*)menuDelegate;
103 103
104 - (NSRect)rect; 104 - (NSRect)rect;
105 105
106 @end 106 @end
107 107
108 @implementation SplitBlockButton 108 @implementation SplitBlockButton
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 [super drawBorderAndBackgroundWithFrame:NSOffsetRect(frame, -4, 0) 332 [super drawBorderAndBackgroundWithFrame:NSOffsetRect(frame, -4, 0)
333 inView:controlView]; 333 inView:controlView];
334 } 334 }
335 335
336 - (NSRect)rect { 336 - (NSRect)rect {
337 NSSize size = [self cellSize]; 337 NSSize size = [self cellSize];
338 return NSMakeRect(0, 0, std::ceil(size.width), std::ceil(size.height)); 338 return NSMakeRect(0, 0, std::ceil(size.width), std::ceil(size.height));
339 } 339 }
340 340
341 @end 341 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698