| 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 // Mac uses sheets, so we can just use the normal ShowConstrainedWebDialog. |
| 253 return ShowConstrainedWebDialog(browser_context, delegate, web_contents); |
| 254 } |
| 255 |
| 248 ConstrainedWebDialogDelegate* ShowConstrainedWebDialogWithAutoResize( | 256 ConstrainedWebDialogDelegate* ShowConstrainedWebDialogWithAutoResize( |
| 249 content::BrowserContext* browser_context, | 257 content::BrowserContext* browser_context, |
| 250 WebDialogDelegate* delegate, | 258 WebDialogDelegate* delegate, |
| 251 content::WebContents* web_contents, | 259 content::WebContents* web_contents, |
| 252 const gfx::Size& min_size, | 260 const gfx::Size& min_size, |
| 253 const gfx::Size& max_size) { | 261 const gfx::Size& max_size) { |
| 254 DCHECK(!min_size.IsEmpty()); | 262 DCHECK(!min_size.IsEmpty()); |
| 255 DCHECK(!max_size.IsEmpty()); | 263 DCHECK(!max_size.IsEmpty()); |
| 256 // Deleted when the dialog closes. | 264 // Deleted when the dialog closes. |
| 257 ConstrainedWebDialogDelegateViewMac* constrained_delegate = | 265 ConstrainedWebDialogDelegateViewMac* constrained_delegate = |
| 258 new ConstrainedWebDialogDelegateViewMac( | 266 new ConstrainedWebDialogDelegateViewMac( |
| 259 browser_context, delegate, web_contents, | 267 browser_context, delegate, web_contents, |
| 260 min_size, max_size); | 268 min_size, max_size); |
| 261 return constrained_delegate; | 269 return constrained_delegate; |
| 262 } | 270 } |
| OLD | NEW |