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 "chrome/browser/ui/views/constrained_window_views.h" | 8 #include "chrome/browser/ui/views/constrained_window_views.h" |
9 #include "components/web_modal/web_contents_modal_dialog_host.h" | 9 #include "components/web_modal/web_contents_modal_dialog_host.h" |
10 #include "components/web_modal/web_contents_modal_dialog_manager.h" | 10 #include "components/web_modal/web_contents_modal_dialog_manager.h" |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 WebContentsModalDialogManager* web_contents_modal_dialog_manager = | 228 WebContentsModalDialogManager* web_contents_modal_dialog_manager = |
229 WebContentsModalDialogManager::FromWebContents(web_contents); | 229 WebContentsModalDialogManager::FromWebContents(web_contents); |
230 WebContentsModalDialogManagerDelegate* modal_delegate = | 230 WebContentsModalDialogManagerDelegate* modal_delegate = |
231 web_contents_modal_dialog_manager->delegate(); | 231 web_contents_modal_dialog_manager->delegate(); |
232 DCHECK(modal_delegate); | 232 DCHECK(modal_delegate); |
233 views::Widget* window = views::Widget::CreateWindowAsFramelessChild( | 233 views::Widget* window = views::Widget::CreateWindowAsFramelessChild( |
234 constrained_delegate, | 234 constrained_delegate, |
235 web_contents->GetView()->GetNativeView(), | 235 web_contents->GetView()->GetNativeView(), |
236 modal_delegate->GetWebContentsModalDialogHost()->GetHostView()); | 236 modal_delegate->GetWebContentsModalDialogHost()->GetHostView()); |
237 web_contents_modal_dialog_manager->ShowDialog(window->GetNativeView()); | 237 web_contents_modal_dialog_manager->ShowDialog(window->GetNativeView()); |
| 238 web_contents_modal_dialog_manager->SetCloseOnInterstitialWebUI( |
| 239 window->GetNativeView(), true); |
238 constrained_delegate->SetWindow(window); | 240 constrained_delegate->SetWindow(window); |
239 return constrained_delegate; | 241 return constrained_delegate; |
240 } | 242 } |
OLD | NEW |