diff --git a/browser/native_window.h b/browser/native_window.h index 316f6f5fe18e..a52448afedf5 100644 --- a/browser/native_window.h +++ b/browser/native_window.h @@ -99,6 +99,7 @@ class NativeWindow : public brightray::DefaultWebContentsDelegate, virtual void FlashFrame(bool flash) = 0; virtual void SetKiosk(bool kiosk) = 0; virtual bool IsKiosk() = 0; + virtual bool HasModalDialog() = 0; virtual gfx::NativeWindow GetNativeWindow() = 0; virtual bool IsClosed() const { return is_closed_; } diff --git a/browser/native_window_mac.h b/browser/native_window_mac.h index d1729a0ef281..0338eebefc3e 100644 --- a/browser/native_window_mac.h +++ b/browser/native_window_mac.h @@ -53,6 +53,7 @@ class NativeWindowMac : public NativeWindow { virtual void FlashFrame(bool flash) OVERRIDE; virtual void SetKiosk(bool kiosk) OVERRIDE; virtual bool IsKiosk() OVERRIDE; + virtual bool HasModalDialog() OVERRIDE; virtual gfx::NativeWindow GetNativeWindow() OVERRIDE; void NotifyWindowBlur() { NativeWindow::NotifyWindowBlur(); } diff --git a/browser/native_window_mac.mm b/browser/native_window_mac.mm index 47fabbfa02b1..e9c12ba976ea 100644 --- a/browser/native_window_mac.mm +++ b/browser/native_window_mac.mm @@ -387,6 +387,10 @@ bool NativeWindowMac::IsKiosk() { return is_kiosk_; } +bool NativeWindowMac::HasModalDialog() { + return [window() attachedSheet] != nil; +} + gfx::NativeWindow NativeWindowMac::GetNativeWindow() { return window(); } diff --git a/browser/native_window_win.h b/browser/native_window_win.h index 9d9ed0df61f1..a583a982e90a 100644 --- a/browser/native_window_win.h +++ b/browser/native_window_win.h @@ -65,6 +65,7 @@ class NativeWindowWin : public NativeWindow, virtual void FlashFrame(bool flash) OVERRIDE; virtual void SetKiosk(bool kiosk) OVERRIDE; virtual bool IsKiosk() OVERRIDE; + virtual bool HasModalDialog() OVERRIDE; virtual gfx::NativeWindow GetNativeWindow() OVERRIDE; void OnMenuCommand(int position, HMENU menu);