win: Set app user model ID
This ID is used by Windows to identify your application.
This commit is contained in:
parent
78322b5231
commit
528f7bd45f
3 changed files with 24 additions and 1 deletions
|
@ -54,11 +54,17 @@ void Browser::AddRecentDocument(const base::FilePath& path) {
|
|||
if (SUCCEEDED(hr)) {
|
||||
SHARDAPPIDINFO info;
|
||||
info.psi = item;
|
||||
info.pszAppID = L"Atom";
|
||||
info.pszAppID = app_user_model_id_.c_str();
|
||||
SHAddToRecentDocs(SHARD_APPIDINFO, &info);
|
||||
}
|
||||
}
|
||||
|
||||
void Browser::SetAppUserModelID(const std::string& name) {
|
||||
app_user_model_id_ = base::UTF8ToUTF16(
|
||||
base::StringPrintf("atom-shell.app.%s", name));
|
||||
SetCurrentProcessExplicitAppUserModelID(app_user_model_id_.c_str());
|
||||
}
|
||||
|
||||
std::string Browser::GetExecutableFileVersion() const {
|
||||
base::FilePath path;
|
||||
if (PathService::Get(base::FILE_EXE, &path)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue