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 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "components/web_modal/web_contents_modal_dialog_host.h" | 8 #include "components/web_modal/web_contents_modal_dialog_host.h" |
9 #include "components/web_modal/web_contents_modal_dialog_manager.h" | 9 #include "components/web_modal/web_contents_modal_dialog_manager.h" |
10 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h" | 10 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h" |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 new ConstrainedWebDialogDelegateViewViews( | 206 new ConstrainedWebDialogDelegateViewViews( |
207 browser_context, delegate, tab_delegate); | 207 browser_context, delegate, tab_delegate); |
208 WebContentsModalDialogManager* web_contents_modal_dialog_manager = | 208 WebContentsModalDialogManager* web_contents_modal_dialog_manager = |
209 WebContentsModalDialogManager::FromWebContents(web_contents); | 209 WebContentsModalDialogManager::FromWebContents(web_contents); |
210 WebContentsModalDialogManagerDelegate* modal_delegate = | 210 WebContentsModalDialogManagerDelegate* modal_delegate = |
211 web_contents_modal_dialog_manager->delegate(); | 211 web_contents_modal_dialog_manager->delegate(); |
212 DCHECK(modal_delegate); | 212 DCHECK(modal_delegate); |
213 views::Widget* window = views::Widget::CreateWindowAsFramelessChild( | 213 views::Widget* window = views::Widget::CreateWindowAsFramelessChild( |
214 constrained_delegate, | 214 constrained_delegate, |
215 modal_delegate->GetWebContentsModalDialogHost()->GetHostView()); | 215 modal_delegate->GetWebContentsModalDialogHost()->GetHostView()); |
216 web_contents_modal_dialog_manager->ShowDialog(window->GetNativeView()); | 216 web_contents_modal_dialog_manager->ShowModalDialog( |
| 217 window->GetNativeView()); |
217 constrained_delegate->SetWindow(window); | 218 constrained_delegate->SetWindow(window); |
218 return constrained_delegate; | 219 return constrained_delegate; |
219 } | 220 } |
OLD | NEW |