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

Unified Diff: apps/shell_window.h

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: apps/shell_window.h
diff --git a/apps/shell_window.h b/apps/shell_window.h
index c236a1d7354f0c6c3f5935b41870a48c817b22a0..2f8ce91d093fe953953bfebb5d82be15a505f906 100644
--- a/apps/shell_window.h
+++ b/apps/shell_window.h
@@ -92,6 +92,30 @@ class ShellWindow : public content::NotificationObserver,
FRAME_NONE, // Frameless window.
};
+ enum FullscreenType {
+ // Normal fullscreen. Primarily used by the app.window api. The window takes
+ // up the entire screen and the window header (title bar and window
+ // controls) is hidden.
+ FULLSCREEN_TYPE_WINDOW,
+
+ // Fullscreen entered by HTML requestFullscreen(). The HTML element on which
+ // requestFullscreen() was called takes up the entire screen and the widnow
+ // header is hidden.
+ FULLSCREEN_TYPE_TAB,
+
+ // Combination of "window" fullscreen and fullscreen entered by HTML
+ // requestFullscreen().
+ FULLSCREEN_TYPE_WINDOW_AND_TAB,
+
+ // Fullscreen entered by hitting <F4> on ChromeOS. The window header slides
+ // onscreen as an overlay when the mouse is hovered at the top of the
+ // screen.
+ FULLSCREEN_TYPE_IMMERSIVE,
+
+ // Not fullscreen.
+ FULLSCREEN_TYPE_NONE
+ };
+
class SizeConstraints {
public:
// The value SizeConstraints uses to represent an unbounded width or height.
@@ -284,6 +308,11 @@ class ShellWindow : public content::NotificationObserver,
void Minimize();
void Restore();
+ // Transitions into immersive fullscreen if immersive fullscreen is supported
+ // and to "window" fullscreen otherwise. See FULLSCREEN_TYPE_IMMERSIVE for
+ // more details.
+ void ImmersiveFullscreen();
+
// Set the minimum and maximum size that this window is allowed to be.
void SetMinimumSize(const gfx::Size& min_size);
void SetMaximumSize(const gfx::Size& max_size);
@@ -310,6 +339,11 @@ class ShellWindow : public content::NotificationObserver,
return size_constraints_;
}
+ // Get the fullscreen type.
+ FullscreenType fullscreen_type() const {
+ return fullscreen_type_;
+ }
+
protected:
virtual ~ShellWindow();
@@ -444,10 +478,8 @@ class ShellWindow : public content::NotificationObserver,
base::WeakPtrFactory<ShellWindow> image_loader_ptr_factory_;
- // Fullscreen entered by app.window api.
- bool fullscreen_for_window_api_;
- // Fullscreen entered by HTML requestFullscreen.
- bool fullscreen_for_tab_;
+ // The fullscreen type.
+ FullscreenType fullscreen_type_;
// Size constraints on the window.
SizeConstraints size_constraints_;
« no previous file with comments | « apps/app_window_contents.cc ('k') | apps/shell_window.cc » ('j') | ash/ash_switches.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698