#include "atom/browser/browser_observer.h"
#include "atom/browser/window_list_observer.h"
+#if defined(OS_WIN)
+#include "base/strings/string16.h"
+#endif
+
namespace base {
class FilePath;
}
void DockSetMenu(ui::MenuModel* model);
#endif // defined(OS_MACOSX)
+#if defined(OS_WIN)
+ // Set the application user model ID, called when "SetName" is called.
+ void SetAppUserModelID(const std::string& name);
+#endif
+
// Tell the application to open a file.
bool OpenFile(const std::string& file_path);
std::string version_override_;
std::string name_override_;
+#if defined(OS_WIN)
+ base::string16 app_user_model_id_;
+#endif
+
DISALLOW_COPY_AND_ASSIGN(Browser);
};
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)) {