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

Unified Diff: chrome/browser/ui/gtk/apps/native_app_window_gtk.cc

Issue 59043013: Add flag to enable immersive fullscreen for v2 apps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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/gtk/apps/native_app_window_gtk.cc
diff --git a/chrome/browser/ui/gtk/apps/native_app_window_gtk.cc b/chrome/browser/ui/gtk/apps/native_app_window_gtk.cc
index 1010390215b3b916294c56cdb4d0ac7ecfa00253..99c243c749fab42a45d56f5358c510b186dda711 100644
--- a/chrome/browser/ui/gtk/apps/native_app_window_gtk.cc
+++ b/chrome/browser/ui/gtk/apps/native_app_window_gtk.cc
@@ -454,7 +454,7 @@ void NativeAppWindowGtk::OnConfigureDebounced() {
// Fullscreen of non-resizable windows requires them to be made resizable
// first. After that takes effect and OnConfigure is called we transition
// to fullscreen.
- if (!IsFullscreen() && IsFullscreenOrPending()) {
+ if (!IsFullscreen() && content_thinks_its_fullscreen_) {
gtk_window_fullscreen(window_);
}
@@ -592,9 +592,10 @@ gboolean NativeAppWindowGtk::OnButtonPress(GtkWidget* widget,
// NativeAppWindow implementation:
-void NativeAppWindowGtk::SetFullscreen(bool fullscreen) {
+void NativeAppWindowGtk::SetFullscreen(ShellWindow::FullscreenType type) {
+ bool fullscreen = (type != ShellWindow::FULLSCREEN_TYPE_NONE);
content_thinks_its_fullscreen_ = fullscreen;
- if (fullscreen){
+ if (fullscreen) {
if (resizable_) {
gtk_window_fullscreen(window_);
} else {
@@ -609,13 +610,8 @@ void NativeAppWindowGtk::SetFullscreen(bool fullscreen) {
}
}
-bool NativeAppWindowGtk::IsFullscreenOrPending() const {
- // |content_thinks_its_fullscreen_| is used when transitioning, and when
- // the state change will not be made for some time. However, it is possible
- // for a state update to be made before the final fullscreen state comes.
- // In that case, |content_thinks_its_fullscreen_| will be cleared, but we
- // will fall back to |IsFullscreen| which will soon have the correct state.
- return content_thinks_its_fullscreen_ || IsFullscreen();
+bool NativeAppWindowGtk::SupportsImmersiveFullscreen() const {
+ return false;
}
bool NativeAppWindowGtk::IsDetached() const {

Powered by Google App Engine
This is Rietveld 408576698