Implement libunity launcher badge counter to be set via electron, fixes #4193

This commit is contained in:
Jonas Schwabe 2016-06-26 01:55:24 +02:00
parent 90ea0a365c
commit b22ce93477
4 changed files with 41 additions and 1 deletions

View file

@ -149,7 +149,14 @@ class Browser : public WindowListObserver {
// one from app's name.
// The returned string managed by Browser, and should not be modified.
PCWSTR GetAppUserModelID();
#endif
#endif // defined(OS_WIN)
#if defined(OS_LINUX)
// Set/Get unity dock's badge counter.
bool UnityLauncherAvailable();
void UnityLauncherSetBadgeCount(int count);
int UnityLauncherGetBadgeCount();
#endif // defined(OS_LINUX)
// Tell the application to open a file.
bool OpenFile(const std::string& file_path);
@ -216,6 +223,8 @@ class Browser : public WindowListObserver {
std::string version_override_;
std::string name_override_;
int current_badge_count_ = 0;
#if defined(OS_WIN)
base::string16 app_user_model_id_;
#endif