fix: enable navigator.setAppBadge/clearAppBadge (#27067)

This commit is contained in:
John Kleinschmidt 2021-01-21 00:45:06 -05:00 committed by GitHub
parent 8b74361b0c
commit c5a41defbd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 481 additions and 41 deletions

12
shell/browser/browser.h Normal file → Executable file
View file

@ -23,6 +23,7 @@
#if defined(OS_WIN)
#include <windows.h>
#include "base/files/file_path.h"
#include "shell/browser/ui/win/taskbar_host.h"
#endif
#if defined(OS_MAC)
@ -107,7 +108,7 @@ class Browser : public WindowListObserver {
#endif
// Set/Get the badge count.
bool SetBadgeCount(int count);
bool SetBadgeCount(base::Optional<int> count);
int GetBadgeCount();
#if defined(OS_WIN)
@ -364,6 +365,15 @@ class Browser : public WindowListObserver {
base::DictionaryValue about_panel_options_;
#endif
#if defined(OS_WIN)
void UpdateBadgeContents(HWND hwnd,
const base::Optional<std::string>& badge_content,
const std::string& badge_alt_string);
// In charge of running taskbar related APIs.
TaskbarHost taskbar_host_;
#endif
DISALLOW_COPY_AND_ASSIGN(Browser);
};