Implement BrowserWindow::ShowInactive
This commit is contained in:
parent
cb9bdbf247
commit
141894aacd
7 changed files with 17 additions and 0 deletions
|
@ -153,6 +153,10 @@ void Window::Show() {
|
||||||
window_->Show();
|
window_->Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Window::ShowInactive() {
|
||||||
|
window_->ShowInactive();
|
||||||
|
}
|
||||||
|
|
||||||
void Window::Hide() {
|
void Window::Hide() {
|
||||||
window_->Hide();
|
window_->Hide();
|
||||||
}
|
}
|
||||||
|
@ -388,6 +392,7 @@ void Window::BuildPrototype(v8::Isolate* isolate,
|
||||||
.SetMethod("focus", &Window::Focus)
|
.SetMethod("focus", &Window::Focus)
|
||||||
.SetMethod("isFocused", &Window::IsFocused)
|
.SetMethod("isFocused", &Window::IsFocused)
|
||||||
.SetMethod("show", &Window::Show)
|
.SetMethod("show", &Window::Show)
|
||||||
|
.SetMethod("showInactive", &Window::ShowInactive)
|
||||||
.SetMethod("hide", &Window::Hide)
|
.SetMethod("hide", &Window::Hide)
|
||||||
.SetMethod("isVisible", &Window::IsVisible)
|
.SetMethod("isVisible", &Window::IsVisible)
|
||||||
.SetMethod("maximize", &Window::Maximize)
|
.SetMethod("maximize", &Window::Maximize)
|
||||||
|
|
|
@ -59,6 +59,7 @@ class Window : public mate::EventEmitter,
|
||||||
void Focus();
|
void Focus();
|
||||||
bool IsFocused();
|
bool IsFocused();
|
||||||
void Show();
|
void Show();
|
||||||
|
void ShowInactive();
|
||||||
void Hide();
|
void Hide();
|
||||||
bool IsVisible();
|
bool IsVisible();
|
||||||
void Maximize();
|
void Maximize();
|
||||||
|
|
|
@ -101,6 +101,7 @@ class NativeWindow : public brightray::DefaultWebContentsDelegate,
|
||||||
virtual void Focus(bool focus) = 0;
|
virtual void Focus(bool focus) = 0;
|
||||||
virtual bool IsFocused() = 0;
|
virtual bool IsFocused() = 0;
|
||||||
virtual void Show() = 0;
|
virtual void Show() = 0;
|
||||||
|
virtual void ShowInactive() = 0;
|
||||||
virtual void Hide() = 0;
|
virtual void Hide() = 0;
|
||||||
virtual bool IsVisible() = 0;
|
virtual bool IsVisible() = 0;
|
||||||
virtual void Maximize() = 0;
|
virtual void Maximize() = 0;
|
||||||
|
|
|
@ -28,6 +28,7 @@ class NativeWindowMac : public NativeWindow {
|
||||||
virtual void Focus(bool focus) OVERRIDE;
|
virtual void Focus(bool focus) OVERRIDE;
|
||||||
virtual bool IsFocused() OVERRIDE;
|
virtual bool IsFocused() OVERRIDE;
|
||||||
virtual void Show() OVERRIDE;
|
virtual void Show() OVERRIDE;
|
||||||
|
virtual void ShowInactive() OVERRIDE;
|
||||||
virtual void Hide() OVERRIDE;
|
virtual void Hide() OVERRIDE;
|
||||||
virtual bool IsVisible() OVERRIDE;
|
virtual bool IsVisible() OVERRIDE;
|
||||||
virtual void Maximize() OVERRIDE;
|
virtual void Maximize() OVERRIDE;
|
||||||
|
|
|
@ -334,6 +334,10 @@ bool NativeWindowMac::IsFocused() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeWindowMac::Show() {
|
void NativeWindowMac::Show() {
|
||||||
|
[window_ makeKeyAndOrderFront:nil];
|
||||||
|
}
|
||||||
|
|
||||||
|
void NativeWindowMac::ShowInactive() {
|
||||||
[window_ orderFrontRegardless];
|
[window_ orderFrontRegardless];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -232,6 +232,10 @@ bool NativeWindowViews::IsFocused() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeWindowViews::Show() {
|
void NativeWindowViews::Show() {
|
||||||
|
window_->Show();
|
||||||
|
}
|
||||||
|
|
||||||
|
void NativeWindowViews::ShowInactive() {
|
||||||
window_->ShowInactive();
|
window_->ShowInactive();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,7 @@ class NativeWindowViews : public NativeWindow,
|
||||||
virtual void Focus(bool focus) OVERRIDE;
|
virtual void Focus(bool focus) OVERRIDE;
|
||||||
virtual bool IsFocused() OVERRIDE;
|
virtual bool IsFocused() OVERRIDE;
|
||||||
virtual void Show() OVERRIDE;
|
virtual void Show() OVERRIDE;
|
||||||
|
virtual void ShowInactive() OVERRIDE;
|
||||||
virtual void Hide() OVERRIDE;
|
virtual void Hide() OVERRIDE;
|
||||||
virtual bool IsVisible() OVERRIDE;
|
virtual bool IsVisible() OVERRIDE;
|
||||||
virtual void Maximize() OVERRIDE;
|
virtual void Maximize() OVERRIDE;
|
||||||
|
|
Loading…
Reference in a new issue