Merge pull request #6497 from electron/windows-thumbnail

Add setThumbnailClip API on Windows
This commit is contained in:
Cheng Zhao 2016-07-15 10:18:39 +09:00 committed by GitHub
commit d186a01815
5 changed files with 39 additions and 0 deletions

View file

@ -649,6 +649,12 @@ bool Window::IsWindowMessageHooked(UINT message) {
void Window::UnhookAllWindowMessages() {
messages_callback_map_.clear();
}
bool Window::SetThumbnailClip(const gfx::Rect& region) {
auto window = static_cast<NativeWindowViews*>(window_.get());
return window->taskbar_host().SetThumbnailClip(
window_->GetAcceleratedWidget(), region);
}
#endif
#if defined(TOOLKIT_VIEWS)
@ -836,6 +842,7 @@ void Window::BuildPrototype(v8::Isolate* isolate,
.SetMethod("isWindowMessageHooked", &Window::IsWindowMessageHooked)
.SetMethod("unhookWindowMessage", &Window::UnhookWindowMessage)
.SetMethod("unhookAllWindowMessages", &Window::UnhookAllWindowMessages)
.SetMethod("setThumbnailClip", &Window::SetThumbnailClip)
#endif
#if defined(TOOLKIT_VIEWS)
.SetMethod("setIcon", &Window::SetIcon)

View file

@ -179,6 +179,7 @@ class Window : public mate::TrackableObject<Window>,
bool IsWindowMessageHooked(UINT message);
void UnhookWindowMessage(UINT message);
void UnhookAllWindowMessages();
bool SetThumbnailClip(const gfx::Rect& region);
#endif
#if defined(TOOLKIT_VIEWS)