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

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

Issue 287123002: [WebModals] New API for browser-scoped popup management. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 5 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 a74a90768fdc444b332d8019e4a1ff4f4de8bf38..ef176f4fb27918fe208ec485f6846de51dd58a80 100644
--- a/chrome/browser/chromeos/attestation/platform_verification_dialog.cc
+++ b/chrome/browser/chromeos/attestation/platform_verification_dialog.cc
@@ -11,9 +11,7 @@
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/singleton_tabs.h"
#include "chrome/common/url_constants.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 "components/web_modal/popup_manager.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/page_transition_types.h"
#include "extensions/browser/extension_registry.h"
@@ -26,6 +24,7 @@
#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 {
@@ -53,13 +52,13 @@ void PlatformVerificationDialog::ShowDialog(
base::UTF8ToUTF16(origin),
callback);
- 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();
+ // 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);
}
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