| 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 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sh
eet.h" | 10 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sh
eet.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 [[window_ contentView] addSubview:GetWebContents()->GetNativeView()]; | 108 [[window_ contentView] addSubview:GetWebContents()->GetNativeView()]; |
| 109 | 109 |
| 110 base::scoped_nsobject<CustomConstrainedWindowSheet> sheet( | 110 base::scoped_nsobject<CustomConstrainedWindowSheet> sheet( |
| 111 [[CustomConstrainedWindowSheet alloc] initWithCustomWindow:window_]); | 111 [[CustomConstrainedWindowSheet alloc] initWithCustomWindow:window_]); |
| 112 constrained_window_.reset(new ConstrainedWindowMac( | 112 constrained_window_.reset(new ConstrainedWindowMac( |
| 113 this, web_contents, sheet)); | 113 this, web_contents, sheet)); |
| 114 | 114 |
| 115 impl_->set_window(constrained_window_.get()); | 115 impl_->set_window(constrained_window_.get()); |
| 116 } | 116 } |
| 117 | 117 |
| 118 ConstrainedWebDialogDelegate* CreateConstrainedWebDialog( | 118 ConstrainedWebDialogDelegate* ShowConstrainedWebDialog( |
| 119 content::BrowserContext* browser_context, | 119 content::BrowserContext* browser_context, |
| 120 WebDialogDelegate* delegate, | 120 WebDialogDelegate* delegate, |
| 121 content::WebContents* web_contents) { | 121 content::WebContents* web_contents) { |
| 122 // Deleted when the dialog closes. | 122 // Deleted when the dialog closes. |
| 123 ConstrainedWebDialogDelegateViewMac* constrained_delegate = | 123 ConstrainedWebDialogDelegateViewMac* constrained_delegate = |
| 124 new ConstrainedWebDialogDelegateViewMac( | 124 new ConstrainedWebDialogDelegateViewMac( |
| 125 browser_context, delegate, web_contents); | 125 browser_context, delegate, web_contents); |
| 126 return constrained_delegate; | 126 return constrained_delegate; |
| 127 } | 127 } |
| OLD | NEW |