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

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

Issue 2625113004: Unify window fullscreen and minimizing implementation (Closed)
Patch Set: Update Created 3 years, 11 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
« ui/base/ui_base_types.h ('K') | « ui/views/widget/native_widget_aura.h ('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 e493ea209646face0149d26149764d78cddc4bbf..6d14716aae2fe641860b53d97a49493fb4946caa 100644
--- a/ui/views/widget/native_widget_aura.cc
+++ b/ui/views/widget/native_widget_aura.cc
@@ -108,7 +108,6 @@ NativeWidgetAura::NativeWidgetAura(internal::NativeWidgetDelegate* delegate,
ownership_(Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET),
destroying_(false),
cursor_(gfx::kNullCursor),
- saved_window_state_(ui::SHOW_STATE_DEFAULT),
close_widget_factory_(this) {
aura::client::SetFocusChangeObserver(window_, this);
aura::client::SetActivationChangeObserver(window_, this);
@@ -633,14 +632,9 @@ void NativeWidgetAura::SetFullscreen(bool fullscreen) {
if (!window_ || IsFullscreen() == fullscreen)
return; // Nothing to do.
- // Save window state before entering full screen so that it could restored
- // when exiting full screen.
- if (fullscreen)
- saved_window_state_ = window_->GetProperty(aura::client::kShowStateKey);
-
window_->SetProperty(
aura::client::kShowStateKey,
- fullscreen ? ui::SHOW_STATE_FULLSCREEN : saved_window_state_);
+ fullscreen ? ui::SHOW_STATE_FULLSCREEN : ui::SHOW_STATE_PREVIOUS);
}
bool NativeWidgetAura::IsFullscreen() const {
« ui/base/ui_base_types.h ('K') | « ui/views/widget/native_widget_aura.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698