Add initial setContentBounds method

This commit is contained in:
Kevin Sawicki 2016-08-04 12:02:24 -07:00
parent 5681ee5220
commit 52199a008d
5 changed files with 21 additions and 3 deletions

View file

@ -366,6 +366,12 @@ gfx::Rect Window::GetBounds() {
return window_->GetBounds();
}
void Window::SetContentBounds(const gfx::Rect& bounds, mate::Arguments* args) {
bool animate = false;
args->GetNext(&animate);
window_->SetContentBounds(bounds, animate);
}
gfx::Rect Window::GetContentBounds() {
return window_->GetContentBounds();
}
@ -790,6 +796,7 @@ void Window::BuildPrototype(v8::Isolate* isolate,
.SetMethod("getSize", &Window::GetSize)
.SetMethod("setSize", &Window::SetSize)
.SetMethod("getContentBounds", &Window::GetContentBounds)
.SetMethod("setContentBounds", &Window::SetContentBounds)
.SetMethod("getContentSize", &Window::GetContentSize)
.SetMethod("setContentSize", &Window::SetContentSize)
.SetMethod("setMinimumSize", &Window::SetMinimumSize)