diff options
author | stevenjb@chromium.org <stevenjb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-25 01:42:30 +0000 |
---|---|---|
committer | stevenjb@chromium.org <stevenjb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-25 01:42:30 +0000 |
commit | 4c1bdfe25b4088e292e521478fcd06e5e096aab9 (patch) | |
tree | 6b650797a3f0459a71236e9b80e1c44ab8ec83cd /ui | |
parent | c0c09f91d95d1801aabfbef23461ba9a4acd379b (diff) | |
download | chromium_src-4c1bdfe25b4088e292e521478fcd06e5e096aab9.zip chromium_src-4c1bdfe25b4088e292e521478fcd06e5e096aab9.tar.gz chromium_src-4c1bdfe25b4088e292e521478fcd06e5e096aab9.tar.bz2 |
Set minimize property and re-enable tests on Aura
Currently we disable several important tests on Aura because Minimize() is unimplemented.
Most significant is ExtensionApiTest.UpdateWindowResize and ExtensionApiTest.UpdateWindowState, which test a lot of the chrome.windows api.
Setting the minimized property but not doing anything satisfies the tests with minimal change, until we determine what the expected minimize behavior is on Aura, and how this affects the extensions API.
BUG=104571
TEST=Tests pass (esp. browser_tests)
Review URL: http://codereview.chromium.org/9372126
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123622 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/views/widget/native_widget_aura.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc index 8435698..291ace0 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 { |