Decouple TaskbarHost from NativeWindow
This commit is contained in:
parent
8f8c3aef87
commit
a28f70e85c
8 changed files with 52 additions and 56 deletions
|
@ -10,28 +10,33 @@
|
|||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
#include "atom/browser/native_window.h"
|
||||
#include "base/callback.h"
|
||||
#include "ui/gfx/image/image.h"
|
||||
|
||||
namespace atom {
|
||||
|
||||
class TaskbarHost {
|
||||
public:
|
||||
explicit TaskbarHost(HWND window);
|
||||
~TaskbarHost();
|
||||
struct ThumbarButton {
|
||||
std::string tooltip;
|
||||
gfx::Image icon;
|
||||
std::vector<std::string> flags;
|
||||
base::Closure clicked_callback;
|
||||
};
|
||||
|
||||
TaskbarHost();
|
||||
virtual ~TaskbarHost();
|
||||
|
||||
bool SetThumbarButtons(
|
||||
const std::vector<NativeWindow::ThumbarButton>& buttons);
|
||||
HWND window, const std::vector<ThumbarButton>& buttons);
|
||||
bool HandleThumbarButtonEvent(int button_id);
|
||||
|
||||
private:
|
||||
using ThumbarButtonClickedCallbackMap = std::map<
|
||||
int, NativeWindow::ThumbarButtonClickedCallback>;
|
||||
using ThumbarButtonClickedCallbackMap = std::map<int, base::Closure>;
|
||||
ThumbarButtonClickedCallbackMap thumbar_button_clicked_callback_map_;
|
||||
|
||||
bool is_initialized_;
|
||||
|
||||
HWND window_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(TaskbarHost);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue