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

View file

@ -166,13 +166,12 @@ bool TaskbarHost::SetProgressBar(HWND window,
}
bool TaskbarHost::SetOverlayIcon(HWND window,
const gfx::Image& overlay,
const SkBitmap& overlay,
const std::string& text) {
if (!InitializeTaskbar())
return false;
base::win::ScopedHICON icon(
IconUtil::CreateHICONFromSkBitmap(overlay.AsBitmap()));
base::win::ScopedHICON icon(IconUtil::CreateHICONFromSkBitmap(overlay));
return SUCCEEDED(taskbar_->SetOverlayIcon(window, icon.get(),
base::UTF8ToUTF16(text).c_str()));
}

View file

@ -48,7 +48,7 @@ class TaskbarHost {
// Set the overlay icon in taskbar.
bool SetOverlayIcon(HWND window,
const gfx::Image& overlay,
const SkBitmap& overlay,
const std::string& text);
// Set the region of the window to show as a thumbnail in taskbar.