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

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

Issue 2625113004: Unify window fullscreen and minimizing implementation (Closed)
Patch Set: Fix review issue 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
« no previous file with comments | « ui/views/widget/native_widget_aura.h ('k') | ui/wm/core/window_util.h » ('j') | 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..75bccedd68f0d07514a91cf98e1a6f3eb98c40aa 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,7 @@ 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_);
+ wm::SetWindowFullscreen(window_, fullscreen);
}
bool NativeWidgetAura::IsFullscreen() const {
« no previous file with comments | « ui/views/widget/native_widget_aura.h ('k') | ui/wm/core/window_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698