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

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..1a03469e7a1fba3e914bc28ca82d6d225d7f7dc6 100644
--- a/apps/shell_window.h
+++ b/apps/shell_window.h
@@ -92,6 +92,26 @@ class ShellWindow : public content::NotificationObserver,
FRAME_NONE, // Frameless window.
};
+ enum FullscreenType {
+ // Normal fullscreen. Primarily used by the app.window api.
+ FULLSCREEN_TYPE_WINDOW,
+
+ // Fullscreen entered by HTML requestFullscreen.
+ FULLSCREEN_TYPE_TAB,
+
+ // Combination of "window" fullscreen and fullscreen entered by HTML
+ // requestFullscreen.
+ FULLSCREEN_TYPE_WINDOW_AND_TAB,
+
+ // Fullscreen entered by <F4> hitting on ChromeOS. In immersive fullscreen,
+ // the window header (title bar and window controls) slides onscreen as an
+ // overlay when the mouse is hovered at the top of the screen.
+ FULLSCREEN_TYPE_IMMERSIVE,
oshima 2013/11/07 18:56:13 Can you explain in the comment how other three typ
+
+ // Not fullscreen.
+ FULLSCREEN_TYPE_NONE
+ };
+
class SizeConstraints {
public:
// The value SizeConstraints uses to represent an unbounded width or height.
@@ -284,6 +304,13 @@ class ShellWindow : public content::NotificationObserver,
void Minimize();
void Restore();
+ // Transitions into immersive fullscreen. In immersive fullscreen, the window
+ // header (title bar and window controls) slides onscreen as an overlay when
+ // the mouse is hovered at the top of the screen. This is a no-op if the
+ // window does not support immersive fullscreen.
oshima 2013/11/07 18:56:13 You can just refer to enum description.
+ void ImmersiveFullscreen();
+
oshima 2013/11/07 18:56:13 nuke extra new line
+
// 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 +337,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 +476,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.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698