.SetMethod("quit", base::Bind(&Browser::Quit, browser))
.SetMethod("exit", base::Bind(&Browser::Exit, browser))
.SetMethod("focus", base::Bind(&Browser::Focus, browser))
+ .SetMethod("hide", base::Bind(&Browser::Hide, browser))
.SetMethod("getVersion", base::Bind(&Browser::GetVersion, browser))
.SetMethod("setVersion", base::Bind(&Browser::SetVersion, browser))
.SetMethod("getName", base::Bind(&Browser::GetName, browser))
// Focus the application.
void Focus();
+ // Focus the application.
+ void Hide();
+
// Returns the version of the executable (or bundle).
std::string GetVersion() const;
[[AtomApplication sharedApplication] activateIgnoringOtherApps:YES];
}
+void Browser::Hide() {
+ [[AtomApplication sharedApplication] hide:nil];
+}
+
void Browser::AddRecentDocument(const base::FilePath& path) {
NSString* path_string = base::mac::FilePathToNSString(path);
if (!path_string)
correctly executed. It is possible that a window cancels the quitting by
returning `false` in the `beforeunload` event handler.
+### `app.hide()` _OS X_
+
+Hides all application windows without minimising them.
+
### `app.exit(exitCode)`
* `exitCode` Integer