diff options
author | dhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-31 23:27:33 +0000 |
---|---|---|
committer | dhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-31 23:27:33 +0000 |
commit | 0fbe67bd15d7e81751ac0532a388315a714ccb6c (patch) | |
tree | b638b9f2c220e2dd2057fd7b1d764b4f7ba6a7d8 /views/test | |
parent | bba630ced52644aaeab2a3e3d5c8348acdcca543 (diff) | |
download | chromium_src-0fbe67bd15d7e81751ac0532a388315a714ccb6c.zip chromium_src-0fbe67bd15d7e81751ac0532a388315a714ccb6c.tar.gz chromium_src-0fbe67bd15d7e81751ac0532a388315a714ccb6c.tar.bz2 |
Restoring a session should restore window minimization state on Windows
These changes enable save and restore of minimized window state on Windows. (Mac and Linux came prior). The window state is now saved whenever size-changed notifications fire (in addition to the original activation and close cases).
BUG=43274
TEST=Manual. Launch Chrome on Windows, create two browser windows, minimize "a" window, quit. Relaunch, expect "a" to be minimized.
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=98679
Review URL: http://codereview.chromium.org/7748036
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99077 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/test')
-rw-r--r-- | views/test/test_views_delegate.cc | 13 | ||||
-rw-r--r-- | views/test/test_views_delegate.h | 11 |
2 files changed, 13 insertions, 11 deletions
diff --git a/views/test/test_views_delegate.cc b/views/test/test_views_delegate.cc index d25e729..7793dc4 100644 --- a/views/test/test_views_delegate.cc +++ b/views/test/test_views_delegate.cc @@ -31,13 +31,16 @@ View* TestViewsDelegate::GetDefaultParentView() { return default_parent_view_; } -bool TestViewsDelegate::GetSavedWindowBounds(const std::wstring& window_name, - gfx::Rect* bounds) const { - return false; +void TestViewsDelegate::SaveWindowPlacement(const Widget* window, + const std::wstring& window_name, + const gfx::Rect& bounds, + ui::WindowShowState show_state) { } -bool TestViewsDelegate::GetSavedMaximizedState(const std::wstring& window_name, - bool* maximized) const { +bool TestViewsDelegate::GetSavedWindowPlacement( + const std::wstring& window_name, + gfx::Rect* bounds, + ui:: WindowShowState* show_state) const { return false; } diff --git a/views/test/test_views_delegate.h b/views/test/test_views_delegate.h index 82618ff..8d07bfc 100644 --- a/views/test/test_views_delegate.h +++ b/views/test/test_views_delegate.h @@ -35,12 +35,11 @@ class TestViewsDelegate : public ViewsDelegate { virtual void SaveWindowPlacement(const Widget* window, const std::wstring& window_name, const gfx::Rect& bounds, - bool maximized) OVERRIDE {} - virtual bool GetSavedWindowBounds(const std::wstring& window_name, - gfx::Rect* bounds) const OVERRIDE; - - virtual bool GetSavedMaximizedState(const std::wstring& window_name, - bool* maximized) const OVERRIDE; + ui::WindowShowState show_state) OVERRIDE; + virtual bool GetSavedWindowPlacement( + const std::wstring& window_name, + gfx::Rect* bounds, + ui::WindowShowState* show_state) const OVERRIDE; virtual void NotifyAccessibilityEvent( View* view, ui::AccessibilityTypes::Event event_type) OVERRIDE {} |