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_wi
ndow.h" | 10 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_wi
ndow.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 } | 65 } |
66 WebDialogDelegate* GetWebDialogDelegate() override { | 66 WebDialogDelegate* GetWebDialogDelegate() override { |
67 return impl_->GetWebDialogDelegate(); | 67 return impl_->GetWebDialogDelegate(); |
68 } | 68 } |
69 void OnDialogCloseFromWebUI() override { | 69 void OnDialogCloseFromWebUI() override { |
70 return impl_->OnDialogCloseFromWebUI(); | 70 return impl_->OnDialogCloseFromWebUI(); |
71 } | 71 } |
72 void ReleaseWebContentsOnDialogClose() override { | 72 void ReleaseWebContentsOnDialogClose() override { |
73 return impl_->ReleaseWebContentsOnDialogClose(); | 73 return impl_->ReleaseWebContentsOnDialogClose(); |
74 } | 74 } |
75 NativeWebContentsModalDialog GetNativeDialog() override { | 75 NativeWebContentsModalDialog GetNativeDialog() override { return window_; } |
76 return constrained_window_->GetNativeDialog(); | |
77 } | |
78 WebContents* GetWebContents() override { return impl_->GetWebContents(); } | 76 WebContents* GetWebContents() override { return impl_->GetWebContents(); } |
79 gfx::Size GetMinimumSize() const override { | 77 gfx::Size GetMinimumSize() const override { |
80 NOTIMPLEMENTED(); | 78 NOTIMPLEMENTED(); |
81 return gfx::Size(); | 79 return gfx::Size(); |
82 } | 80 } |
83 gfx::Size GetMaximumSize() const override { | 81 gfx::Size GetMaximumSize() const override { |
84 NOTIMPLEMENTED(); | 82 NOTIMPLEMENTED(); |
85 return gfx::Size(); | 83 return gfx::Size(); |
86 } | 84 } |
87 gfx::Size GetPreferredSize() const override { | 85 gfx::Size GetPreferredSize() const override { |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 ConstrainedWebDialogDelegate* ShowConstrainedWebDialog( | 131 ConstrainedWebDialogDelegate* ShowConstrainedWebDialog( |
134 content::BrowserContext* browser_context, | 132 content::BrowserContext* browser_context, |
135 WebDialogDelegate* delegate, | 133 WebDialogDelegate* delegate, |
136 content::WebContents* web_contents) { | 134 content::WebContents* web_contents) { |
137 // Deleted when the dialog closes. | 135 // Deleted when the dialog closes. |
138 ConstrainedWebDialogDelegateViewMac* constrained_delegate = | 136 ConstrainedWebDialogDelegateViewMac* constrained_delegate = |
139 new ConstrainedWebDialogDelegateViewMac( | 137 new ConstrainedWebDialogDelegateViewMac( |
140 browser_context, delegate, web_contents); | 138 browser_context, delegate, web_contents); |
141 return constrained_delegate; | 139 return constrained_delegate; |
142 } | 140 } |
OLD | NEW |