mac: Implement app.setBadgeCount

This commit is contained in:
Cheng Zhao 2016-07-01 17:39:01 +09:00
parent 36a0a491c9
commit cb00d3cfb3
7 changed files with 37 additions and 60 deletions

View file

@ -87,6 +87,10 @@ class Browser : public WindowListObserver {
// Query the current state of default handler for a protocol.
bool IsDefaultProtocolClient(const std::string& protocol);
// Set/Get the badge count.
void SetBadgeCount(int count);
int GetBadgeCount();
#if defined(OS_MACOSX)
// Hide the application.
void Hide();
@ -152,10 +156,8 @@ class Browser : public WindowListObserver {
#endif // defined(OS_WIN)
#if defined(OS_LINUX)
// Set/Get unity dock's badge counter.
bool UnityLauncherAvailable();
void UnityLauncherSetBadgeCount(int count);
int UnityLauncherGetBadgeCount();
// Whether Unity launcher is running.
bool IsUnityRunning();
#endif // defined(OS_LINUX)
// Tell the application to open a file.
@ -223,9 +225,7 @@ class Browser : public WindowListObserver {
std::string version_override_;
std::string name_override_;
#if defined(OS_LINUX)
int current_badge_count_ = 0;
#endif
#if defined(OS_WIN)
base::string16 app_user_model_id_;