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

Unified Diff: extensions/browser/app_window/app_window.cc

Issue 1172483003: [MacViews] Update AppWindow when the native window changes fullscreen state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@views
Patch Set: Address comments. Created 5 years, 6 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 | « chrome/browser/ui/cocoa/apps/native_app_window_cocoa_browsertest.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/app_window/app_window.cc
diff --git a/extensions/browser/app_window/app_window.cc b/extensions/browser/app_window/app_window.cc
index c1959a98c82541c665e543ff7fba235de8b74b5f..992c8717108daad0cb3759c8571a7a43caffda69 100644
--- a/extensions/browser/app_window/app_window.cc
+++ b/extensions/browser/app_window/app_window.cc
@@ -454,6 +454,22 @@ void AppWindow::OnNativeClose() {
}
void AppWindow::OnNativeWindowChanged() {
+#if defined(OS_MACOSX)
tapted 2015/06/10 05:45:25 before this, I'd just do if (!native_app_window
jackhou1 2015/06/10 07:52:32 Done.
+ // On Mac the user can change the window's fullscreen state. If that has
+ // happened, update AppWindow's internal state.
+ if (native_app_window_) {
+ bool native_is_fullscreen = native_app_window_->IsFullscreen();
+ bool was_fullscreen = IsFullscreen();
+ if (native_is_fullscreen)
+ fullscreen_types_ |= FULLSCREEN_TYPE_OS;
+ else
+ fullscreen_types_ = FULLSCREEN_TYPE_NONE;
+
+ if (native_is_fullscreen != was_fullscreen && cached_always_on_top_)
tapted 2015/06/10 05:45:25 I don't think the `native_is_fullscreen != was_ful
jackhou1 2015/06/10 07:52:32 Done.
+ UpdateNativeAlwaysOnTop(); // Same as in SetNativeWindowFullscreen.
+ }
+#endif
+
SaveWindowPosition();
#if defined(OS_WIN)
« no previous file with comments | « chrome/browser/ui/cocoa/apps/native_app_window_cocoa_browsertest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698