OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "views/widget/native_widget_aura.h" | 5 #include "views/widget/native_widget_aura.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "ui/aura/client/aura_constants.h" | 8 #include "ui/aura/client/aura_constants.h" |
9 #include "ui/aura/desktop.h" | 9 #include "ui/aura/desktop.h" |
10 #include "ui/aura/desktop_observer.h" | 10 #include "ui/aura/desktop_observer.h" |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 gfx::Rect NativeWidgetAura::GetWindowScreenBounds() const { | 318 gfx::Rect NativeWidgetAura::GetWindowScreenBounds() const { |
319 return window_->GetScreenBounds(); | 319 return window_->GetScreenBounds(); |
320 } | 320 } |
321 | 321 |
322 gfx::Rect NativeWidgetAura::GetClientAreaScreenBounds() const { | 322 gfx::Rect NativeWidgetAura::GetClientAreaScreenBounds() const { |
323 // In Aura, the entire window is the client area. | 323 // In Aura, the entire window is the client area. |
324 return window_->GetScreenBounds(); | 324 return window_->GetScreenBounds(); |
325 } | 325 } |
326 | 326 |
327 gfx::Rect NativeWidgetAura::GetRestoredBounds() const { | 327 gfx::Rect NativeWidgetAura::GetRestoredBounds() const { |
328 return window_->restore_bounds(); | 328 gfx::Rect* restore_bounds = reinterpret_cast<gfx::Rect*>( |
| 329 window_->GetProperty(aura::kRestoreBoundsKey)); |
| 330 return restore_bounds ? *restore_bounds : window_->bounds(); |
329 } | 331 } |
330 | 332 |
331 void NativeWidgetAura::SetBounds(const gfx::Rect& bounds) { | 333 void NativeWidgetAura::SetBounds(const gfx::Rect& bounds) { |
332 window_->SetBounds(bounds); | 334 window_->SetBounds(bounds); |
333 } | 335 } |
334 | 336 |
335 void NativeWidgetAura::SetSize(const gfx::Size& size) { | 337 void NativeWidgetAura::SetSize(const gfx::Size& size) { |
336 window_->SetBounds(gfx::Rect(window_->bounds().origin(), size)); | 338 window_->SetBounds(gfx::Rect(window_->bounds().origin(), size)); |
337 } | 339 } |
338 | 340 |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
722 NOTIMPLEMENTED(); | 724 NOTIMPLEMENTED(); |
723 } | 725 } |
724 | 726 |
725 // static | 727 // static |
726 bool NativeWidgetPrivate::IsMouseButtonDown() { | 728 bool NativeWidgetPrivate::IsMouseButtonDown() { |
727 return aura::Desktop::GetInstance()->IsMouseButtonDown(); | 729 return aura::Desktop::GetInstance()->IsMouseButtonDown(); |
728 } | 730 } |
729 | 731 |
730 } // namespace internal | 732 } // namespace internal |
731 } // namespace views | 733 } // namespace views |
OLD | NEW |