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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/gtk/apps/native_app_window_gtk.h" 5 #include "chrome/browser/ui/gtk/apps/native_app_window_gtk.h"
6 6
7 #include <gdk/gdkx.h> 7 #include <gdk/gdkx.h>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/message_loop/message_pump_gtk.h" 10 #include "base/message_loop/message_pump_gtk.h"
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 if (has_hit_titlebar || has_hit_edge) 586 if (has_hit_titlebar || has_hit_edge)
587 gdk_window_lower(gdk_window); 587 gdk_window_lower(gdk_window);
588 return TRUE; 588 return TRUE;
589 } 589 }
590 590
591 return FALSE; 591 return FALSE;
592 } 592 }
593 593
594 // NativeAppWindow implementation: 594 // NativeAppWindow implementation:
595 595
596 void NativeAppWindowGtk::SetFullscreen(bool fullscreen) { 596 void NativeAppWindowGtk::SetFullscreen(int fullscreen_types) {
597 bool fullscreen = (fullscreen_types != ShellWindow::FULLSCREEN_TYPE_NONE);
597 content_thinks_its_fullscreen_ = fullscreen; 598 content_thinks_its_fullscreen_ = fullscreen;
598 if (fullscreen){ 599 if (fullscreen) {
599 if (resizable_) { 600 if (resizable_) {
600 gtk_window_fullscreen(window_); 601 gtk_window_fullscreen(window_);
601 } else { 602 } else {
602 // We must first make the window resizable. That won't take effect 603 // We must first make the window resizable. That won't take effect
603 // immediately, so OnConfigureDebounced completes the fullscreen call. 604 // immediately, so OnConfigureDebounced completes the fullscreen call.
604 gtk_window_set_resizable(window_, TRUE); 605 gtk_window_set_resizable(window_, TRUE);
605 } 606 }
606 } else { 607 } else {
607 gtk_window_unfullscreen(window_); 608 gtk_window_unfullscreen(window_);
608 if (!resizable_) 609 if (!resizable_)
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 hints_mask |= GDK_HINT_MAX_SIZE; 712 hints_mask |= GDK_HINT_MAX_SIZE;
712 } 713 }
713 if (hints_mask) { 714 if (hints_mask) {
714 gtk_window_set_geometry_hints( 715 gtk_window_set_geometry_hints(
715 window_, 716 window_,
716 GTK_WIDGET(window_), 717 GTK_WIDGET(window_),
717 &hints, 718 &hints,
718 static_cast<GdkWindowHints>(hints_mask)); 719 static_cast<GdkWindowHints>(hints_mask));
719 } 720 }
720 } 721 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/apps/native_app_window_gtk.h ('k') | chrome/browser/ui/views/apps/native_app_window_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698