Get BrowserWindow::getContentSize API.
This commit is contained in:
parent
8d5fbe525d
commit
76cc3eeb6d
9 changed files with 29 additions and 0 deletions
|
@ -181,6 +181,14 @@ std::vector<int> Window::GetSize() {
|
|||
return result;
|
||||
}
|
||||
|
||||
std::vector<int> Window::GetContentSize() {
|
||||
std::vector<int> result(2);
|
||||
gfx::Size size = window_->GetContentSize();
|
||||
result[0] = size.width();
|
||||
result[1] = size.height();
|
||||
return result;
|
||||
}
|
||||
|
||||
void Window::SetMinimumSize(int width, int height) {
|
||||
window_->SetMinimumSize(gfx::Size(width, height));
|
||||
}
|
||||
|
@ -331,6 +339,7 @@ void Window::BuildPrototype(v8::Isolate* isolate,
|
|||
.SetMethod("setFullScreen", &Window::SetFullscreen)
|
||||
.SetMethod("isFullScreen", &Window::IsFullscreen)
|
||||
.SetMethod("getSize", &Window::GetSize)
|
||||
.SetMethod("getContentSize", &Window::GetContentSize)
|
||||
.SetMethod("setSize", &Window::SetSize)
|
||||
.SetMethod("setMinimumSize", &Window::SetMinimumSize)
|
||||
.SetMethod("getMinimumSize", &Window::GetMinimumSize)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue