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

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

Issue 319013002: Reland Fix Views web-modal dialog widget creation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert MediaGalleriesScanResultDialogViews::AcceptDialogForTesting. Created 6 years, 6 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 | « no previous file | 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 2bda3a83d38a697ace8c39173c745b720cc0a365..a74a90768fdc444b332d8019e4a1ff4f4de8bf38 100644
--- a/chrome/browser/chromeos/attestation/platform_verification_dialog.cc
+++ b/chrome/browser/chromeos/attestation/platform_verification_dialog.cc
@@ -53,15 +53,12 @@ void PlatformVerificationDialog::ShowDialog(
base::UTF8ToUTF16(origin),
callback);
- // Sets up the dialog widget and shows it.
- web_modal::WebContentsModalDialogManager* web_contents_modal_dialog_manager =
+ web_modal::WebContentsModalDialogManager* manager =
web_modal::WebContentsModalDialogManager::FromWebContents(web_contents);
- web_modal::WebContentsModalDialogManagerDelegate* modal_delegate =
- web_contents_modal_dialog_manager->delegate();
- views::Widget* widget = views::Widget::CreateWindowAsFramelessChild(
- dialog, modal_delegate->GetWebContentsModalDialogHost()->GetHostView());
- web_contents_modal_dialog_manager->ShowModalDialog(
- widget->GetNativeView());
+ const gfx::NativeWindow parent =
+ manager->delegate()->GetWebContentsModalDialogHost()->GetHostView();
+ views::Widget* widget = CreateDialogWidget(dialog, NULL, parent);
+ manager->ShowModalDialog(widget->GetNativeView());
widget->Show();
}
« no previous file with comments | « no previous file | 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