Add BrowserWindow::setContentSize.

This commit is contained in:
Cheng Zhao 2014-05-15 16:05:35 +08:00
parent 511a49f6fb
commit 5150fd6946
9 changed files with 33 additions and 1 deletions

View file

@ -262,6 +262,11 @@ gfx::Size NativeWindowGtk::GetSize() {
return gfx::Size(frame_extents.width, frame_extents.height);
}
void NativeWindowGtk::SetContentSize(const gfx::Size& size) {
GtkAllocation size = { 0, 0, size.width(), size.height() };
gtk_widget_size_allocate(GetWebContents()->GetView()->GetNativeView(), &size);
}
gfx::Size NativeWindowGtk::GetContentSize() {
gint width, height;
gtk_window_get_size(window_, &width, &height);