| Index: chrome/browser/chromeos/login/ui/captive_portal_window_proxy.cc
|
| diff --git a/chrome/browser/chromeos/login/ui/captive_portal_window_proxy.cc b/chrome/browser/chromeos/login/ui/captive_portal_window_proxy.cc
|
| index 24b00ecc3556eea6676f91f3af28a84fcc242824..11405f3a2dfcedbc2af4feadbbb176c4db8b1617 100644
|
| --- a/chrome/browser/chromeos/login/ui/captive_portal_window_proxy.cc
|
| +++ b/chrome/browser/chromeos/login/ui/captive_portal_window_proxy.cc
|
| @@ -7,11 +7,12 @@
|
| #include "chrome/browser/chromeos/login/ui/captive_portal_view.h"
|
| #include "chrome/browser/chromeos/login/ui/proxy_settings_dialog.h"
|
| #include "chrome/browser/chromeos/profiles/profile_helper.h"
|
| -#include "components/web_modal/popup_manager.h"
|
| +#include "components/web_modal/web_contents_modal_dialog_host.h"
|
| +#include "components/web_modal/web_contents_modal_dialog_manager.h"
|
| +#include "components/web_modal/web_contents_modal_dialog_manager_delegate.h"
|
| #include "ui/views/widget/widget.h"
|
|
|
| namespace {
|
| -
|
| // The captive portal dialog is system-modal, but uses the web-content-modal
|
| // dialog manager (odd) and requires this atypical dialog widget initialization.
|
| views::Widget* CreateWindowAsFramelessChild(views::WidgetDelegate* delegate,
|
| @@ -71,15 +72,16 @@ void CaptivePortalWindowProxy::Show() {
|
| InitCaptivePortalView();
|
|
|
| CaptivePortalView* portal = captive_portal_view_.release();
|
| - web_modal::PopupManager* popup_manager =
|
| - web_modal::PopupManager::FromWebContents(web_contents_);
|
| - if (popup_manager) {
|
| - widget_ =
|
| - CreateWindowAsFramelessChild(portal, popup_manager->GetHostView());
|
| - portal->Init();
|
| - widget_->AddObserver(this);
|
| - popup_manager->ShowModalDialog(widget_->GetNativeView(), web_contents_);
|
| - }
|
| + web_modal::WebContentsModalDialogManager* manager =
|
| + web_modal::WebContentsModalDialogManager::FromWebContents(web_contents_);
|
| + const gfx::NativeWindow parent =
|
| + manager->delegate()->GetWebContentsModalDialogHost()->GetHostView();
|
| + widget_ = CreateWindowAsFramelessChild(portal, parent);
|
| + portal->Init();
|
| +
|
| + widget_->AddObserver(this);
|
| + manager->ShowModalDialog(widget_->GetNativeView());
|
| + DCHECK(GetState() == STATE_DISPLAYED);
|
| }
|
|
|
| void CaptivePortalWindowProxy::Close() {
|
|
|