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

Unified Diff: chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm

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, 7 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: chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm
diff --git a/chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm b/chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm
index 94d0dca5f38b18171b6e6272a14f0257a599f7dd..6594f0c55b0867f126454568782a954dbfc45777 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm
+++ b/chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm
@@ -207,6 +207,8 @@ class DevtoolsNotificationBridge : public content::NotificationObserver {
- (void)close {
// |windowWillClose:| could have already been called. http://crbug.com/279505
if (host_) {
+ // TODO(gbillock): Repoint to the PopupManager. Needs a new API to know if
+ // the current popup should block tab close?
web_modal::WebContentsModalDialogManager* modalDialogManager =
web_modal::WebContentsModalDialogManager::FromWebContents(
host_->host_contents());
@@ -234,6 +236,9 @@ class DevtoolsNotificationBridge : public content::NotificationObserver {
// it steals key-ness from the popup. Don't close the popup when this
// happens. There's an extra windowDidResignKey: notification after the
// modal dialog closes that should also be ignored.
+ // TODO(gbillock): Repoint to the PopupManager. Is this even an issue this
+ // class needs to worry about? Or can we eliminate this case through the
+ // PopupManager itself?
web_modal::WebContentsModalDialogManager* modalDialogManager =
web_modal::WebContentsModalDialogManager::FromWebContents(
host_->host_contents());

Powered by Google App Engine
This is Rietveld 408576698