Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4887)

Unified Diff: chrome/browser/chromeos/attestation/platform_verification_dialog.cc

Issue 586933002: Re-Revert "[WebModals] New API for browser-scoped popup management." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2125
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « apps/app_window.cc ('k') | chrome/browser/chromeos/login/ui/captive_portal_window_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/attestation/platform_verification_dialog.cc
diff --git a/chrome/browser/chromeos/attestation/platform_verification_dialog.cc b/chrome/browser/chromeos/attestation/platform_verification_dialog.cc
index bc47bdfae52ccf218f8edb9e1418b1b9857baea9..1b89269b67d7d4fab506adc03675c6b6e8d7e4aa 100644
--- a/chrome/browser/chromeos/attestation/platform_verification_dialog.cc
+++ b/chrome/browser/chromeos/attestation/platform_verification_dialog.cc
@@ -12,7 +12,9 @@
#include "chrome/browser/ui/singleton_tabs.h"
#include "chrome/common/url_constants.h"
#include "chrome/grit/generated_resources.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 "content/public/browser/web_contents.h"
#include "content/public/common/page_transition_types.h"
#include "extensions/browser/extension_registry.h"
@@ -24,7 +26,6 @@
#include "ui/views/layout/fill_layout.h"
#include "ui/views/layout/layout_constants.h"
#include "ui/views/widget/widget.h"
-#include "ui/views/window/dialog_delegate.h"
namespace chromeos {
namespace attestation {
@@ -52,13 +53,13 @@ void PlatformVerificationDialog::ShowDialog(
base::UTF8ToUTF16(origin),
callback);
- // Sets up the dialog widget to be shown.
- web_modal::PopupManager* popup_manager =
- web_modal::PopupManager::FromWebContents(web_contents);
- DCHECK(popup_manager);
- views::Widget* widget = views::DialogDelegate::CreateDialogWidget(
- dialog, NULL, popup_manager->GetHostView());
- 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();
+ views::Widget* widget = CreateDialogWidget(dialog, NULL, parent);
+ manager->ShowModalDialog(widget->GetNativeView());
+ widget->Show();
}
PlatformVerificationDialog::~PlatformVerificationDialog() {
« no previous file with comments | « apps/app_window.cc ('k') | chrome/browser/chromeos/login/ui/captive_portal_window_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698