2015-08-02 03:11:29 +00:00
|
|
|
// 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_
|
2015-08-02 03:11:29 +00:00
|
|
|
|
|
|
|
#include <windows.h>
|
|
|
|
|
|
|
|
#include <map>
|
|
|
|
#include <vector>
|
|
|
|
|
2015-08-05 14:26:18 +00:00
|
|
|
#include "atom/browser/native_window.h"
|
2015-08-02 03:11:29 +00:00
|
|
|
|
|
|
|
namespace atom {
|
|
|
|
|
2015-08-06 02:30:22 +00:00
|
|
|
class TaskbarHost {
|
2015-08-02 03:11:29 +00:00
|
|
|
public:
|
2015-08-06 02:30:22 +00:00
|
|
|
explicit TaskbarHost(HWND window);
|
|
|
|
~TaskbarHost();
|
2015-08-02 03:11:29 +00:00
|
|
|
|
|
|
|
bool SetThumbarButtons(
|
2015-08-05 14:26:18 +00:00
|
|
|
const std::vector<NativeWindow::ThumbarButton>& buttons);
|
2015-08-02 03:11:29 +00:00
|
|
|
bool HandleThumbarButtonEvent(int button_id);
|
|
|
|
|
|
|
|
private:
|
|
|
|
using ThumbarButtonClickedCallbackMap = std::map<
|
2015-08-05 14:26:18 +00:00
|
|
|
int, NativeWindow::ThumbarButtonClickedCallback>;
|
2015-08-02 03:11:29 +00:00
|
|
|
ThumbarButtonClickedCallbackMap thumbar_button_clicked_callback_map_;
|
|
|
|
|
|
|
|
bool is_initialized_;
|
|
|
|
|
|
|
|
HWND window_;
|
|
|
|
|
2015-08-06 02:30:22 +00:00
|
|
|
DISALLOW_COPY_AND_ASSIGN(TaskbarHost);
|
2015-08-02 03:11:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace atom
|
|
|
|
|
2015-08-06 02:30:22 +00:00
|
|
|
#endif // ATOM_BROWSER_UI_WIN_TASKBAR_HOST_H_
|