Pass app path as command line argument

This commit is contained in:
Ryohei Ikegami 2017-04-04 09:36:01 +09:00
parent 9cb6bc098d
commit 4a7eec8f2d
7 changed files with 31 additions and 7 deletions

View file

@ -655,6 +655,14 @@ void App::OnGpuProcessCrashed(base::TerminationStatus status) {
status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED);
}
std::string App::GetAppPath() {
return app_path_;
}
void App::SetAppPath(const std::string& app_path) {
app_path_ = app_path;
}
base::FilePath App::GetPath(mate::Arguments* args, const std::string& name) {
bool succeed = false;
base::FilePath path;
@ -959,6 +967,8 @@ void App::BuildPrototype(
.SetMethod("isUnityRunning",
base::Bind(&Browser::IsUnityRunning, browser))
#endif
.SetMethod("setAppPath", &App::SetAppPath)
.SetMethod("getAppPath", &App::GetAppPath)
.SetMethod("setPath", &App::SetPath)
.SetMethod("getPath", &App::GetPath)
.SetMethod("setDesktopName", &App::SetDesktopName)