fix: enable navigator.setAppBadge/clearAppBadge (#27067)
This commit is contained in:
parent
8b74361b0c
commit
c5a41defbd
19 changed files with 481 additions and 41 deletions
12
shell/browser/browser.h
Normal file → Executable file
12
shell/browser/browser.h
Normal file → Executable 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);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue