Revert #2879
This commit is contained in:
parent
6082b83a65
commit
8d61531f4e
3 changed files with 1 additions and 13 deletions
|
@ -158,13 +158,8 @@ void NativeWindow::InitFromOptions(const mate::Dictionary& options) {
|
||||||
// Then show it.
|
// Then show it.
|
||||||
bool show = true;
|
bool show = true;
|
||||||
options.Get(switches::kShow, &show);
|
options.Get(switches::kShow, &show);
|
||||||
if (show) {
|
if (show)
|
||||||
Show();
|
Show();
|
||||||
} else {
|
|
||||||
// When RenderView is created it sets to visible, this is to prevent
|
|
||||||
// breaking the visibility API.
|
|
||||||
web_contents()->WasHidden();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeWindow::SetSize(const gfx::Size& size) {
|
void NativeWindow::SetSize(const gfx::Size& size) {
|
||||||
|
|
|
@ -470,8 +470,6 @@ bool NativeWindowMac::IsFocused() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeWindowMac::Show() {
|
void NativeWindowMac::Show() {
|
||||||
web_contents()->WasShown();
|
|
||||||
|
|
||||||
// This method is supposed to put focus on window, however if the app does not
|
// This method is supposed to put focus on window, however if the app does not
|
||||||
// have focus then "makeKeyAndOrderFront" will only show the window.
|
// have focus then "makeKeyAndOrderFront" will only show the window.
|
||||||
[NSApp activateIgnoringOtherApps:YES];
|
[NSApp activateIgnoringOtherApps:YES];
|
||||||
|
@ -480,13 +478,11 @@ void NativeWindowMac::Show() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeWindowMac::ShowInactive() {
|
void NativeWindowMac::ShowInactive() {
|
||||||
web_contents()->WasShown();
|
|
||||||
[window_ orderFrontRegardless];
|
[window_ orderFrontRegardless];
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeWindowMac::Hide() {
|
void NativeWindowMac::Hide() {
|
||||||
[window_ orderOut:nil];
|
[window_ orderOut:nil];
|
||||||
web_contents()->WasHidden();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowMac::IsVisible() {
|
bool NativeWindowMac::IsVisible() {
|
||||||
|
|
|
@ -343,17 +343,14 @@ bool NativeWindowViews::IsFocused() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeWindowViews::Show() {
|
void NativeWindowViews::Show() {
|
||||||
web_contents()->WasShown();
|
|
||||||
window_->native_widget_private()->ShowWithWindowState(GetRestoredState());
|
window_->native_widget_private()->ShowWithWindowState(GetRestoredState());
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeWindowViews::ShowInactive() {
|
void NativeWindowViews::ShowInactive() {
|
||||||
web_contents()->WasShown();
|
|
||||||
window_->ShowInactive();
|
window_->ShowInactive();
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeWindowViews::Hide() {
|
void NativeWindowViews::Hide() {
|
||||||
window_->Hide();
|
|
||||||
web_contents()->WasHidden();
|
web_contents()->WasHidden();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue