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

Side by Side Diff: chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "chrome/browser/ui/webui/constrained_web_dialog_delegate_base.h" 5 #include "chrome/browser/ui/webui/constrained_web_dialog_delegate_base.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "base/mac/scoped_nsobject.h" 9 #include "base/mac/scoped_nsobject.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 GetWebContents()->GetRenderViewHost(); 173 GetWebContents()->GetRenderViewHost();
174 render_view_host->EnableAutoResize(min_size_, max_size_); 174 render_view_host->EnableAutoResize(min_size_, max_size_);
175 } 175 }
176 176
177 // Whether or not the dialog is autoresizable is determined based on whether 177 // Whether or not the dialog is autoresizable is determined based on whether
178 // |max_size_| was specified. 178 // |max_size_| was specified.
179 bool IsDialogAutoResizable() { 179 bool IsDialogAutoResizable() {
180 return !max_size_.IsEmpty(); 180 return !max_size_.IsEmpty();
181 } 181 }
182 182
183 scoped_ptr<ConstrainedWebDialogDelegateMac> impl_; 183 std::unique_ptr<ConstrainedWebDialogDelegateMac> impl_;
184 scoped_ptr<ConstrainedWindowMac> constrained_window_; 184 std::unique_ptr<ConstrainedWindowMac> constrained_window_;
185 base::scoped_nsobject<NSWindow> window_; 185 base::scoped_nsobject<NSWindow> window_;
186 186
187 // Minimum and maximum sizes to determine dialog bounds for auto-resizing. 187 // Minimum and maximum sizes to determine dialog bounds for auto-resizing.
188 const gfx::Size min_size_; 188 const gfx::Size min_size_;
189 const gfx::Size max_size_; 189 const gfx::Size max_size_;
190 190
191 DISALLOW_COPY_AND_ASSIGN(ConstrainedWebDialogDelegateViewMac); 191 DISALLOW_COPY_AND_ASSIGN(ConstrainedWebDialogDelegateViewMac);
192 }; 192 };
193 193
194 ConstrainedWebDialogDelegateViewMac::ConstrainedWebDialogDelegateViewMac( 194 ConstrainedWebDialogDelegateViewMac::ConstrainedWebDialogDelegateViewMac(
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 const gfx::Size& max_size) { 255 const gfx::Size& max_size) {
256 DCHECK(!min_size.IsEmpty()); 256 DCHECK(!min_size.IsEmpty());
257 DCHECK(!max_size.IsEmpty()); 257 DCHECK(!max_size.IsEmpty());
258 // Deleted when the dialog closes. 258 // Deleted when the dialog closes.
259 ConstrainedWebDialogDelegateViewMac* constrained_delegate = 259 ConstrainedWebDialogDelegateViewMac* constrained_delegate =
260 new ConstrainedWebDialogDelegateViewMac( 260 new ConstrainedWebDialogDelegateViewMac(
261 browser_context, delegate, web_contents, 261 browser_context, delegate, web_contents,
262 min_size, max_size); 262 min_size, max_size);
263 return constrained_delegate; 263 return constrained_delegate;
264 } 264 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698