electron/atom/browser/ui/win/taskbar_host.h

46 lines
1,013 B
C
Raw Normal View History

// Copyright (c) 2015 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
2015-08-06 02:30:22 +00:00
#ifndef ATOM_BROWSER_UI_WIN_TASKBAR_HOST_H_
#define ATOM_BROWSER_UI_WIN_TASKBAR_HOST_H_
#include <windows.h>
#include <map>
#include <vector>
2015-08-06 03:10:34 +00:00
#include "base/callback.h"
#include "ui/gfx/image/image.h"
namespace atom {
2015-08-06 02:30:22 +00:00
class TaskbarHost {
public:
2015-08-06 03:10:34 +00:00
struct ThumbarButton {
std::string tooltip;
gfx::Image icon;
std::vector<std::string> flags;
base::Closure clicked_callback;
};
TaskbarHost();
virtual ~TaskbarHost();
bool SetThumbarButtons(
2015-08-06 03:10:34 +00:00
HWND window, const std::vector<ThumbarButton>& buttons);
bool HandleThumbarButtonEvent(int button_id);
private:
2015-08-06 03:10:34 +00:00
using ThumbarButtonClickedCallbackMap = std::map<int, base::Closure>;
ThumbarButtonClickedCallbackMap thumbar_button_clicked_callback_map_;
bool is_initialized_;
2015-08-06 02:30:22 +00:00
DISALLOW_COPY_AND_ASSIGN(TaskbarHost);
};
} // namespace atom
2015-08-06 02:30:22 +00:00
#endif // ATOM_BROWSER_UI_WIN_TASKBAR_HOST_H_