Add "quit" event for app.
This commit is contained in:
parent
dbbfef38b1
commit
909ff085ac
5 changed files with 14 additions and 0 deletions
|
@ -91,6 +91,10 @@ void App::OnWindowAllClosed() {
|
|||
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);
|
||||
|
|
|
@ -36,6 +36,7 @@ class App : public mate::EventEmitter,
|
|||
// 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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue