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

Unified Diff: apps/app_window.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, 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
Index: apps/app_window.cc
diff --git a/apps/app_window.cc b/apps/app_window.cc
index 814d2e0ae82f470d9016b39b416201cc9098eb9a..2c64ab3747e626678c17148741f1345838125795 100644
--- a/apps/app_window.cc
+++ b/apps/app_window.cc
@@ -264,6 +264,7 @@ void AppWindow::Init(const GURL& url,
content::WebContentsObserver::Observe(web_contents);
}
delegate_->InitWebContents(web_contents);
+
WebContentsModalDialogManager::CreateForWebContents(web_contents);
// TODO(jamescook): Delegate out this creation.
extensions::ChromeExtensionWebContentsObserver::CreateForWebContents(
@@ -286,6 +287,11 @@ void AppWindow::Init(const GURL& url,
native_app_window_.reset(delegate_->CreateNativeAppWindow(this, new_params));
+ DCHECK(GetWebContentsModalDialogHost());
benwells 2014/06/30 01:16:52 Nit: can you do DCHECK(popup_manager_.get()) a lit
Greg Billock 2014/06/30 04:37:36 Removed this, at least for now. It turns out Cocoa
+ popup_manager_.reset(
+ new web_modal::PopupManager(GetWebContentsModalDialogHost()));
+ popup_manager_->RegisterWith(web_contents);
benwells 2014/06/30 01:16:52 Does there need to be unregistering somewhere?
+
// Prevent the browser process from shutting down while this window exists.
AppsClient::Get()->IncrementKeepAliveCount();
UpdateExtensionAppIcon();

Powered by Google App Engine
This is Rietveld 408576698