Merge pull request #5720 from danhp/release-single-instance
Add 'app.releaseSingleInstance()'
This commit is contained in:
commit
26fa963a70
3 changed files with 15 additions and 1 deletions
|
@ -401,6 +401,13 @@ bool App::MakeSingleInstance(
|
|||
}
|
||||
}
|
||||
|
||||
void App::ReleaseSingleInstance() {
|
||||
if (process_singleton_.get()) {
|
||||
process_singleton_->Cleanup();
|
||||
process_singleton_.reset();
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(USE_NSS_CERTS)
|
||||
void App::ImportCertificate(
|
||||
const base::DictionaryValue& options,
|
||||
|
@ -480,7 +487,8 @@ void App::BuildPrototype(
|
|||
#if defined(USE_NSS_CERTS)
|
||||
.SetMethod("importCertificate", &App::ImportCertificate)
|
||||
#endif
|
||||
.SetMethod("makeSingleInstance", &App::MakeSingleInstance);
|
||||
.SetMethod("makeSingleInstance", &App::MakeSingleInstance)
|
||||
.SetMethod("releaseSingleInstance", &App::ReleaseSingleInstance);
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
|
|
@ -108,6 +108,7 @@ class App : public AtomBrowserClient::Delegate,
|
|||
void SetDesktopName(const std::string& desktop_name);
|
||||
bool MakeSingleInstance(
|
||||
const ProcessSingleton::NotificationCallback& callback);
|
||||
void ReleaseSingleInstance();
|
||||
std::string GetLocale();
|
||||
|
||||
#if defined(USE_NSS_CERTS)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue