Emit 'open-file' event when OS X is trying to open file with the app.
This commit is contained in:
parent
01af2fd0c5
commit
7dd48e24d3
10 changed files with 49 additions and 3 deletions
|
@ -32,6 +32,15 @@ void Browser::Quit() {
|
|||
window_list->CloseAllWindows();
|
||||
}
|
||||
|
||||
bool Browser::OpenFile(const std::string& file_path) {
|
||||
bool prevent_default = false;
|
||||
FOR_EACH_OBSERVER(BrowserObserver,
|
||||
observers_,
|
||||
OnOpenFile(&prevent_default, file_path));
|
||||
|
||||
return prevent_default;
|
||||
}
|
||||
|
||||
void Browser::NotifyAndTerminate() {
|
||||
bool prevent_default = false;
|
||||
FOR_EACH_OBSERVER(BrowserObserver, observers_, OnWillQuit(&prevent_default));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue