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

Unified Diff: ui/views/mus/desktop_window_tree_host_mus.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
Index: ui/views/mus/desktop_window_tree_host_mus.cc
diff --git a/ui/views/mus/desktop_window_tree_host_mus.cc b/ui/views/mus/desktop_window_tree_host_mus.cc
index 87571a76b30d3abaca869fa53a465775f39b287a..ab67555718382bc10abe9e08f4eafbbfa3229939 100644
--- a/ui/views/mus/desktop_window_tree_host_mus.cc
+++ b/ui/views/mus/desktop_window_tree_host_mus.cc
@@ -177,7 +177,6 @@ DesktopWindowTreeHostMus::DesktopWindowTreeHostMus(
mus_properties),
native_widget_delegate_(native_widget_delegate),
desktop_native_widget_aura_(desktop_native_widget_aura),
- fullscreen_restore_state_(ui::SHOW_STATE_DEFAULT),
close_widget_factory_(this) {
aura::Env::GetInstance()->AddObserver(this);
MusClient::Get()->AddObserver(this);
@@ -596,16 +595,9 @@ void DesktopWindowTreeHostMus::SetFullscreen(bool fullscreen) {
if (IsFullscreen() == fullscreen)
return; // Nothing to do.
- // Save window state before entering full screen so that it could restored
- // when exiting full screen.
- if (fullscreen) {
- fullscreen_restore_state_ =
- window()->GetProperty(aura::client::kShowStateKey);
- }
-
window()->SetProperty(
aura::client::kShowStateKey,
- fullscreen ? ui::SHOW_STATE_FULLSCREEN : fullscreen_restore_state_);
+ fullscreen ? ui::SHOW_STATE_FULLSCREEN : ui::SHOW_STATE_PREVIOUS);
}
bool DesktopWindowTreeHostMus::IsFullscreen() const {

Powered by Google App Engine
This is Rietveld 408576698