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

Side by Side Diff: chrome/browser/ui/cocoa/translate/translate_bubble_controller.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/translate/translate_bubble_controller.h" 5 #import "chrome/browser/ui/cocoa/translate/translate_bubble_controller.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/mac/foundation_util.h" 9 #include "base/mac/foundation_util.h"
10 #include "base/mac/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 - (void)handleSourceLanguagePopUpButtonSelectedItemChanged:(id)sender; 106 - (void)handleSourceLanguagePopUpButtonSelectedItemChanged:(id)sender;
107 - (void)handleTargetLanguagePopUpButtonSelectedItemChanged:(id)sender; 107 - (void)handleTargetLanguagePopUpButtonSelectedItemChanged:(id)sender;
108 108
109 @end 109 @end
110 110
111 @implementation TranslateBubbleController 111 @implementation TranslateBubbleController
112 112
113 @synthesize webContents = webContents_; 113 @synthesize webContents = webContents_;
114 114
115 - (id)initWithParentWindow:(BrowserWindowController*)controller 115 - (id)initWithParentWindow:(BrowserWindowController*)controller
116 model:(scoped_ptr<TranslateBubbleModel>)model 116 model:(std::unique_ptr<TranslateBubbleModel>)model
117 webContents:(content::WebContents*)webContents { 117 webContents:(content::WebContents*)webContents {
118 NSWindow* parentWindow = [controller window]; 118 NSWindow* parentWindow = [controller window];
119 119
120 // Use an arbitrary size; it will be changed in performLayout. 120 // Use an arbitrary size; it will be changed in performLayout.
121 NSRect contentRect = ui::kWindowSizeDeterminedLater; 121 NSRect contentRect = ui::kWindowSizeDeterminedLater;
122 base::scoped_nsobject<InfoBubbleWindow> window( 122 base::scoped_nsobject<InfoBubbleWindow> window(
123 [[InfoBubbleWindow alloc] initWithContentRect:contentRect 123 [[InfoBubbleWindow alloc] initWithContentRect:contentRect
124 styleMask:NSBorderlessWindowMask 124 styleMask:NSBorderlessWindowMask
125 backing:NSBackingStoreBuffered 125 backing:NSBackingStoreBuffered
126 defer:NO]); 126 defer:NO]);
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 [self updateAdvancedView]; 653 [self updateAdvancedView];
654 } 654 }
655 655
656 - (void)handleTargetLanguagePopUpButtonSelectedItemChanged:(id)sender { 656 - (void)handleTargetLanguagePopUpButtonSelectedItemChanged:(id)sender {
657 NSPopUpButton* button = base::mac::ObjCCastStrict<NSPopUpButton>(sender); 657 NSPopUpButton* button = base::mac::ObjCCastStrict<NSPopUpButton>(sender);
658 model_->UpdateTargetLanguageIndex([button indexOfSelectedItem]); 658 model_->UpdateTargetLanguageIndex([button indexOfSelectedItem]);
659 [self updateAdvancedView]; 659 [self updateAdvancedView];
660 } 660 }
661 661
662 @end 662 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698