| 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..21fa8f6f651155b296ac4646b82c223b05afb3df 100644
|
| --- a/chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm
|
| +++ b/chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm
|
| @@ -207,11 +207,11 @@ class DevtoolsNotificationBridge : public content::NotificationObserver {
|
| - (void)close {
|
| // |windowWillClose:| could have already been called. http://crbug.com/279505
|
| if (host_) {
|
| - web_modal::WebContentsModalDialogManager* modalDialogManager =
|
| - web_modal::WebContentsModalDialogManager::FromWebContents(
|
| - host_->host_contents());
|
| - if (modalDialogManager &&
|
| - modalDialogManager->IsDialogActive()) {
|
| + // TODO(gbillock): Change this API to say directly if the current popup
|
| + // should block tab close? This is a bit over-reaching.
|
| + Browser* browser = chrome::BrowserFromWebContents(host_->host_contents());
|
| + if (browser && browser->popup_manager()->IsWebModalDialogActive(
|
| + host_->host_contents())) {
|
| return;
|
| }
|
| }
|
| @@ -234,6 +234,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());
|
|
|