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

Unified Diff: chrome/browser/ui/views/apps/chrome_native_app_window_views_aura.cc

Issue 2622053004: ash: Restore previous show state after exiting fullscreen. (Closed)
Patch Set: Add unittest for fullscreen 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: chrome/browser/ui/views/apps/chrome_native_app_window_views_aura.cc
diff --git a/chrome/browser/ui/views/apps/chrome_native_app_window_views_aura.cc b/chrome/browser/ui/views/apps/chrome_native_app_window_views_aura.cc
index 6b672506f49d2456b447507a35e9def2c62b049e..e995fa8c145dfead2e16d86e51982c691a0f43c6 100644
--- a/chrome/browser/ui/views/apps/chrome_native_app_window_views_aura.cc
+++ b/chrome/browser/ui/views/apps/chrome_native_app_window_views_aura.cc
@@ -93,9 +93,9 @@ ChromeNativeAppWindowViewsAura::CreateNonStandardAppFrame() {
}
ui::WindowShowState ChromeNativeAppWindowViewsAura::GetRestoredState() const {
- // Use kRestoreShowStateKey in case a window is minimized/hidden.
+ // Use kPreMinimizedShowStateKey in case a window is minimized/hidden.
sky 2017/01/18 22:59:49 Shouldn't this check the current state and then us
Peng 2017/01/19 14:12:38 Looks like this function is used for saving the wi
sky 2017/01/19 16:58:57 This should return the current state. Why does it
Peng 2017/01/19 20:20:03 I think this function is used for getting and savi
sky 2017/01/19 21:55:38 I believe this function is the same as NativeWidge
Peng 2017/01/20 19:18:01 I tried return current show state in this function
ui::WindowShowState restore_state = widget()->GetNativeWindow()->GetProperty(
sky 2017/01/19 16:58:57 Please move this to where it's needed.
Peng 2017/01/19 20:20:03 Done.
- aura::client::kRestoreShowStateKey);
+ aura::client::kPreMinimizedShowStateKey);
// First normal states are checked.
if (IsMaximized())
@@ -104,10 +104,10 @@ ui::WindowShowState ChromeNativeAppWindowViewsAura::GetRestoredState() const {
return ui::SHOW_STATE_FULLSCREEN;
}
- if (widget()->GetNativeWindow()->GetProperty(
- aura::client::kShowStateKey) == ui::SHOW_STATE_DOCKED ||
+ if (widget()->GetNativeWindow()->GetProperty(aura::client::kShowStateKey) ==
+ ui::SHOW_STATE_DOCKED ||
sky 2017/01/19 16:58:57 Why can't this function return the showstate alway
Peng 2017/01/19 20:20:03 I cannot find GetRestoredState() in NativeWidgteAu
widget()->GetNativeWindow()->GetProperty(
- aura::client::kRestoreShowStateKey) == ui::SHOW_STATE_DOCKED) {
+ aura::client::kPreMinimizedShowStateKey) == ui::SHOW_STATE_DOCKED) {
return ui::SHOW_STATE_DOCKED;
}

Powered by Google App Engine
This is Rietveld 408576698