| 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 // ConstrainedWebDialogDelegate interface | 111 // ConstrainedWebDialogDelegate interface |
| 112 const WebDialogDelegate* GetWebDialogDelegate() const override { | 112 const WebDialogDelegate* GetWebDialogDelegate() const override { |
| 113 return impl_->GetWebDialogDelegate(); | 113 return impl_->GetWebDialogDelegate(); |
| 114 } | 114 } |
| 115 WebDialogDelegate* GetWebDialogDelegate() override { | 115 WebDialogDelegate* GetWebDialogDelegate() override { |
| 116 return impl_->GetWebDialogDelegate(); | 116 return impl_->GetWebDialogDelegate(); |
| 117 } | 117 } |
| 118 void OnDialogCloseFromWebUI() override { | 118 void OnDialogCloseFromWebUI() override { |
| 119 return impl_->OnDialogCloseFromWebUI(); | 119 return impl_->OnDialogCloseFromWebUI(); |
| 120 } | 120 } |
| 121 void ReleaseWebContentsOnDialogClose() override { | 121 std::unique_ptr<content::WebContents> ReleaseWebContents() override { |
| 122 return impl_->ReleaseWebContentsOnDialogClose(); | 122 return impl_->ReleaseWebContents(); |
| 123 } | 123 } |
| 124 gfx::NativeWindow GetNativeDialog() override { return window_; } | 124 gfx::NativeWindow GetNativeDialog() override { return window_; } |
| 125 WebContents* GetWebContents() override { return impl_->GetWebContents(); } | 125 WebContents* GetWebContents() override { return impl_->GetWebContents(); } |
| 126 gfx::Size GetMinimumSize() const override { | 126 gfx::Size GetMinimumSize() const override { |
| 127 return min_size_; | 127 return min_size_; |
| 128 } | 128 } |
| 129 gfx::Size GetMaximumSize() const override { | 129 gfx::Size GetMaximumSize() const override { |
| 130 return max_size_; | 130 return max_size_; |
| 131 } | 131 } |
| 132 gfx::Size GetPreferredSize() const override { | 132 gfx::Size GetPreferredSize() const override { |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 const gfx::Size& max_size) { | 253 const gfx::Size& max_size) { |
| 254 DCHECK(!min_size.IsEmpty()); | 254 DCHECK(!min_size.IsEmpty()); |
| 255 DCHECK(!max_size.IsEmpty()); | 255 DCHECK(!max_size.IsEmpty()); |
| 256 // Deleted when the dialog closes. | 256 // Deleted when the dialog closes. |
| 257 ConstrainedWebDialogDelegateViewMac* constrained_delegate = | 257 ConstrainedWebDialogDelegateViewMac* constrained_delegate = |
| 258 new ConstrainedWebDialogDelegateViewMac( | 258 new ConstrainedWebDialogDelegateViewMac( |
| 259 browser_context, delegate, web_contents, | 259 browser_context, delegate, web_contents, |
| 260 min_size, max_size); | 260 min_size, max_size); |
| 261 return constrained_delegate; | 261 return constrained_delegate; |
| 262 } | 262 } |
| OLD | NEW |