Save the thumbar buttons when setting them

Then restore the buttons when restoring the taskbar icon
This commit is contained in:
Samuel Attard 2016-08-13 01:55:42 +10:00
parent 0b624315b2
commit 2fa7aa3c71
4 changed files with 17 additions and 3 deletions

View file

@ -34,6 +34,8 @@ class TaskbarHost {
bool SetThumbarButtons(
HWND window, const std::vector<ThumbarButton>& buttons);
void RestoreThumbarButtons(HWND window);
// Set the progress state in taskbar.
bool SetProgressBar(HWND window, double value, const std::string& mode);
@ -57,6 +59,8 @@ class TaskbarHost {
using CallbackMap = std::map<int, base::Closure>;
CallbackMap callback_map_;
std::vector<ThumbarButton> last_buttons_;
// The COM object of taskbar.
base::win::ScopedComPtr<ITaskbarList3> taskbar_;