| 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* ShowTopLevelConstrainedWebDialog( |
| 249 content::BrowserContext* browser_context, |
| 250 WebDialogDelegate* delegate, |
| 251 content::WebContents* web_contents) { |
| 252 // Deleted when the dialog closes. |
| 253 NOTREACHED(); // This is not needed on Mac since Mac uses sheets. |
| 254 ConstrainedWebDialogDelegateViewMac* constrained_delegate = |
| 255 new ConstrainedWebDialogDelegateViewMac( |
| 256 browser_context, delegate, web_contents, gfx::Size(), gfx::Size()); |
| 257 return constrained_delegate; |
| 258 } |
| 259 |
| 248 ConstrainedWebDialogDelegate* ShowConstrainedWebDialogWithAutoResize( | 260 ConstrainedWebDialogDelegate* ShowConstrainedWebDialogWithAutoResize( |
| 249 content::BrowserContext* browser_context, | 261 content::BrowserContext* browser_context, |
| 250 WebDialogDelegate* delegate, | 262 WebDialogDelegate* delegate, |
| 251 content::WebContents* web_contents, | 263 content::WebContents* web_contents, |
| 252 const gfx::Size& min_size, | 264 const gfx::Size& min_size, |
| 253 const gfx::Size& max_size) { | 265 const gfx::Size& max_size) { |
| 254 DCHECK(!min_size.IsEmpty()); | 266 DCHECK(!min_size.IsEmpty()); |
| 255 DCHECK(!max_size.IsEmpty()); | 267 DCHECK(!max_size.IsEmpty()); |
| 256 // Deleted when the dialog closes. | 268 // Deleted when the dialog closes. |
| 257 ConstrainedWebDialogDelegateViewMac* constrained_delegate = | 269 ConstrainedWebDialogDelegateViewMac* constrained_delegate = |
| 258 new ConstrainedWebDialogDelegateViewMac( | 270 new ConstrainedWebDialogDelegateViewMac( |
| 259 browser_context, delegate, web_contents, | 271 browser_context, delegate, web_contents, |
| 260 min_size, max_size); | 272 min_size, max_size); |
| 261 return constrained_delegate; | 273 return constrained_delegate; |
| 262 } | 274 } |
| OLD | NEW |