Emit("window-all-closed");
}
+void App::OnQuit() {
+ Emit("quit");
+}
+
void App::OnOpenFile(bool* prevent_default, const std::string& file_path) {
base::ListValue args;
args.AppendString(file_path);
// BrowserObserver implementations:
virtual void OnWillQuit(bool* prevent_default) OVERRIDE;
virtual void OnWindowAllClosed() OVERRIDE;
+ virtual void OnQuit() OVERRIDE;
virtual void OnOpenFile(bool* prevent_default,
const std::string& file_path) OVERRIDE;
virtual void OnOpenURL(const std::string& url) OVERRIDE;
}
void Browser::Shutdown() {
+ FOR_EACH_OBSERVER(BrowserObserver, observers_, OnQuit());
+
is_quiting_ = true;
base::MessageLoop::current()->Quit();
}
// method will not be called, instead it will call OnWillQuit.
virtual void OnWindowAllClosed() {}
+ // The browser is quitting.
+ virtual void OnQuit() {}
+
// The browser has opened a file by double clicking in Finder or dragging the
// file to the Dock icon. (OS X only)
virtual void OnOpenFile(bool* prevent_default,
See description of `window-all-closed` for the differences between `will-quit`
and it.
+## Event: quit
+
+Emitted when application is quitting.
+
## Event: open-file
* `event` Event