Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Unified Diff: ui/views/widget/native_widget_aura.cc

Issue 9372126: Set minimize property and re-enable tests on Aura (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add fullscreen check. Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/extension_tabs_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/native_widget_aura.cc
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc
index 8435698b4ac1131132905a817dd0ed2af272dd40..291ace08e030ccc8cc1ebac216306415f3ce762f 100644
--- a/ui/views/widget/native_widget_aura.cc
+++ b/ui/views/widget/native_widget_aura.cc
@@ -409,6 +409,11 @@ gfx::Rect NativeWidgetAura::GetClientAreaScreenBounds() const {
}
gfx::Rect NativeWidgetAura::GetRestoredBounds() const {
+ // Restored bounds should only be relevant if the window is minimized or
+ // maximized. However, in some places the code expectes GetRestoredBounds()
+ // to return the current window bounds if the window is not in either state.
+ if (!IsMinimized() && !IsMaximized() && !IsFullscreen())
+ return window_->bounds();
gfx::Rect* restore_bounds =
window_->GetProperty(aura::client::kRestoreBoundsKey);
return restore_bounds ? *restore_bounds : window_->bounds();
@@ -517,8 +522,9 @@ void NativeWidgetAura::Maximize() {
}
void NativeWidgetAura::Minimize() {
- // No minimized window for aura. crbug.com/104571.
- NOTREACHED();
+ // Note: This currently does not do anything except set the property,
+ // see crbug.com/104571.
+ window_->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MINIMIZED);
}
bool NativeWidgetAura::IsMaximized() const {
« no previous file with comments | « chrome/browser/extensions/extension_tabs_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698