removed move utility and replaced with setbounds

This commit is contained in:
deepak1556 2015-05-01 20:10:46 +05:30
parent ae6a1b409f
commit 9ae59e8ac7
6 changed files with 40 additions and 42 deletions

View file

@ -291,10 +291,6 @@ void NativeWindowViews::CloseImmediately() {
window_->CloseNow();
}
void NativeWindowViews::Move(const gfx::Rect& bounds) {
window_->SetBounds(bounds);
}
void NativeWindowViews::Focus(bool focus) {
if (focus)
window_->Activate();
@ -374,11 +370,25 @@ bool NativeWindowViews::IsFullscreen() const {
}
void NativeWindowViews::SetBounds(const gfx::Rect& bounds) {
window_->SetBoundsConstrained(bounds);
#if defined(USE_X11)
// On Linux the minimum and maximum size should be updated with window size
// when window is not resizable.
if (!resizable_) {
SetMaximumSize(bounds.size());
SetMinimumSize(bounds.size());
}
#endif
window_->SetBounds(bounds);
}
gfx::Rect NativeWindowViews::GetBounds() {
return window_->GetRestoredBounds();
#if defined(OS_WIN)
if (IsMinimized())
return window_->GetRestoredBounds();
#endif
return window_->GetWindowBoundsInScreen();
}
void NativeWindowViews::SetSize(const gfx::Size& size) {
@ -395,12 +405,7 @@ void NativeWindowViews::SetSize(const gfx::Size& size) {
}
gfx::Size NativeWindowViews::GetSize() {
#if defined(OS_WIN)
if (IsMinimized())
return window_->GetRestoredBounds().size();
#endif
return window_->GetWindowBoundsInScreen().size();
return GetBounds().size();
}
void NativeWindowViews::SetContentSize(const gfx::Size& size) {