mac: Add API to return whether the window has attached sheet.
This commit is contained in:
parent
7d5826df85
commit
d6d1604623
4 changed files with 7 additions and 0 deletions
|
@ -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_; }
|
||||
|
|
|
@ -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(); }
|
||||
|
|
|
@ -387,6 +387,10 @@ bool NativeWindowMac::IsKiosk() {
|
|||
return is_kiosk_;
|
||||
}
|
||||
|
||||
bool NativeWindowMac::HasModalDialog() {
|
||||
return [window() attachedSheet] != nil;
|
||||
}
|
||||
|
||||
gfx::NativeWindow NativeWindowMac::GetNativeWindow() {
|
||||
return window();
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue