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

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

Issue 10883069: Added restore functionality for maximize full/left/right (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Created 8 years, 4 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
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 96c9e58c484289d94d6acfa8a7b71047a3caa11c..d8524a3c5fc38398d5f9c97580e91038e287424b 100644
--- a/ui/views/widget/native_widget_aura.cc
+++ b/ui/views/widget/native_widget_aura.cc
@@ -586,6 +586,20 @@ bool NativeWidgetAura::IsMinimized() const {
void NativeWidgetAura::Restore() {
window_->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
+/*
sky 2012/08/29 17:29:20 ?
Mr4D (OOO till 08-26) 2012/08/29 18:57:34 Daeng. I left that in while reverting all other ch
+ gfx::Rect* restore_bounds =
+ window_->GetProperty(aura::client::kRestoreBoundsKey);
+ // If the windows state is already normal, but there is a restore bounds
+ // stored, we might are on Left/Right maximize mode and only need to restore
+ if (restore_bounds && !IsMinimized() && !IsMaximized() && !IsFullscreen()) {
+ // Since there is a restore bound, but no extreme state set, this has to be
+ // a L/R maximized mode restore.
+ SetBounds(*restore_bounds);
+ window_->ClearProperty(aura::client::kRestoreBoundsKey);
+ } else {
+ window_->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
+ }
+*/
}
void NativeWidgetAura::SetFullscreen(bool fullscreen) {

Powered by Google App Engine
This is Rietveld 408576698