Emit 'open-file' event when OS X is trying to open file with the app.

This commit is contained in:
Cheng Zhao 2013-05-30 16:03:10 +08:00
parent 01af2fd0c5
commit 7dd48e24d3
10 changed files with 49 additions and 3 deletions

View file

@ -5,6 +5,8 @@
#ifndef ATOM_BROSER_BROWSER_OBSERVER_H_
#define ATOM_BROSER_BROWSER_OBSERVER_H_
#include <string>
namespace atom {
class BrowserObserver {
@ -16,6 +18,11 @@ class BrowserObserver {
// method will not be called, instead it will call OnWillQuit.
virtual void OnWindowAllClosed() {}
// 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,
const std::string& file_path) {}
protected:
virtual ~BrowserObserver() {}
};