| Index: chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm
|
| diff --git a/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm b/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm
|
| index f043fad5a0c019634695a187d725aec839d59d58..8ffb441862cf31512322ae0e08251f904b2e85cb 100644
|
| --- a/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm
|
| +++ b/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm
|
| @@ -32,6 +32,16 @@ ConstrainedWindowMac::ConstrainedWindowMac(
|
| manager->ShowDialogWithManager([sheet sheetWindow], native_manager.Pass());
|
| }
|
|
|
| +bool ConstrainedWindowMac::HasTopLevelDialogManager(
|
| + content::WebContents* web_contents) {
|
| + // |web_contents| may be embedded within a chain of nested GuestViews. If it
|
| + // is, follow the chain of embedders to the outermost WebContents and use it.
|
| + web_contents =
|
| + guest_view::GuestViewBase::GetTopLevelWebContents(web_contents);
|
| +
|
| + return WebContentsModalDialogManager::FromWebContents(web_contents) != NULL;
|
| +}
|
| +
|
| ConstrainedWindowMac::~ConstrainedWindowMac() {
|
| CHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
|
| DCHECK(!manager_);
|
|
|