Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 238 WebDialogDelegate* delegate, | 238 WebDialogDelegate* delegate, |
| 239 content::WebContents* web_contents) { | 239 content::WebContents* web_contents) { |
| 240 // Deleted when the dialog closes. | 240 // Deleted when the dialog closes. |
| 241 ConstrainedWebDialogDelegateViewMac* constrained_delegate = | 241 ConstrainedWebDialogDelegateViewMac* constrained_delegate = |
| 242 new ConstrainedWebDialogDelegateViewMac( | 242 new ConstrainedWebDialogDelegateViewMac( |
| 243 browser_context, delegate, web_contents, | 243 browser_context, delegate, web_contents, |
| 244 gfx::Size(), gfx::Size()); | 244 gfx::Size(), gfx::Size()); |
| 245 return constrained_delegate; | 245 return constrained_delegate; |
| 246 } | 246 } |
| 247 | 247 |
| 248 ConstrainedWebDialogDelegate* ShowNonClippedConstrainedWebDialog( | |
| 249 content::BrowserContext* browser_context, | |
| 250 WebDialogDelegate* delegate, | |
| 251 content::WebContents* web_contents) { | |
| 252 // Deleted when the dialog closes. | |
|
Mike Wittman
2016/08/16 01:07:07
This comment is defunct and can be removed.
rbpotter
2016/08/16 18:49:44
Done.
| |
| 253 // Mac uses sheets, so we can just use the normal ShowConstrainedWebDialog. | |
| 254 return ShowConstrainedWebDialog(browser_context, delegate, web_contents); | |
| 255 } | |
| 256 | |
| 248 ConstrainedWebDialogDelegate* ShowConstrainedWebDialogWithAutoResize( | 257 ConstrainedWebDialogDelegate* ShowConstrainedWebDialogWithAutoResize( |
| 249 content::BrowserContext* browser_context, | 258 content::BrowserContext* browser_context, |
| 250 WebDialogDelegate* delegate, | 259 WebDialogDelegate* delegate, |
| 251 content::WebContents* web_contents, | 260 content::WebContents* web_contents, |
| 252 const gfx::Size& min_size, | 261 const gfx::Size& min_size, |
| 253 const gfx::Size& max_size) { | 262 const gfx::Size& max_size) { |
| 254 DCHECK(!min_size.IsEmpty()); | 263 DCHECK(!min_size.IsEmpty()); |
| 255 DCHECK(!max_size.IsEmpty()); | 264 DCHECK(!max_size.IsEmpty()); |
| 256 // Deleted when the dialog closes. | 265 // Deleted when the dialog closes. |
| 257 ConstrainedWebDialogDelegateViewMac* constrained_delegate = | 266 ConstrainedWebDialogDelegateViewMac* constrained_delegate = |
| 258 new ConstrainedWebDialogDelegateViewMac( | 267 new ConstrainedWebDialogDelegateViewMac( |
| 259 browser_context, delegate, web_contents, | 268 browser_context, delegate, web_contents, |
| 260 min_size, max_size); | 269 min_size, max_size); |
| 261 return constrained_delegate; | 270 return constrained_delegate; |
| 262 } | 271 } |
| OLD | NEW |