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_; |