Add app.setPath and app.getPath APIs

They can be used to set/get any path defined in PathService
This commit is contained in:
Cheng Zhao 2015-01-18 17:52:15 -08:00
parent 2d1afbf51b
commit 06da5f254a
4 changed files with 33 additions and 9 deletions

View file

@ -48,6 +48,10 @@ class App : public mate::EventEmitter,
v8::Isolate* isolate) override;
private:
// Get/Set the pre-defined path in PathService.
base::FilePath GetPath(const std::string& name);
void SetPath(const std::string& name, const base::FilePath& path);
void SetDataPath(const base::FilePath& path);
base::FilePath GetDataPath();
void ResolveProxy(const GURL& url, ResolveProxyCallback callback);