changes requested for pull request #2250 into electron master

This commit is contained in:
Michael S. Barthelemy 2015-07-22 10:23:31 -04:00
parent 6656afd57f
commit 6d25c81bd1
6 changed files with 40 additions and 33 deletions

View file

@ -249,9 +249,8 @@ bool Window::IsFullscreen() {
return window_->IsFullscreen();
}
void Window::MaintainContentAspectRatio(double aspectRatio,
double width, double height) {
window_->MaintainContentAspectRatio(aspectRatio, gfx::Size(width, height));
void Window::SetAspectRatio(double aspectRatio, gfx::Size extraSize) {
window_->SetAspectRatio(aspectRatio, extraSize);
}
void Window::SetBounds(const gfx::Rect& bounds) {
@ -503,8 +502,7 @@ void Window::BuildPrototype(v8::Isolate* isolate,
.SetMethod("isMinimized", &Window::IsMinimized)
.SetMethod("setFullScreen", &Window::SetFullScreen)
.SetMethod("isFullScreen", &Window::IsFullscreen)
.SetMethod("maintainContentAspectRatio",
&Window::MaintainContentAspectRatio)
.SetMethod("setAspectRatio", &Window::SetAspectRatio)
.SetMethod("getBounds", &Window::GetBounds)
.SetMethod("setBounds", &Window::SetBounds)
.SetMethod("getSize", &Window::GetSize)

View file

@ -95,8 +95,7 @@ class Window : public mate::TrackableObject<Window>,
bool IsMinimized();
void SetFullScreen(bool fullscreen);
bool IsFullscreen();
void MaintainContentAspectRatio(double aspectRatio,
double width, double height);
void SetAspectRatio(double aspectRatio, gfx::Size extraSize);
void SetBounds(const gfx::Rect& bounds);
gfx::Rect GetBounds();
void SetSize(int width, int height);