Chromium Code Reviews| Index: apps/shell_window.h |
| diff --git a/apps/shell_window.h b/apps/shell_window.h |
| index c236a1d7354f0c6c3f5935b41870a48c817b22a0..96c3d0c516264de2f521454b9403fbf4039f4bba 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, |
|
pkotwicz
2013/11/13 00:10:13
I suspect that we want to use this type of fullscr
benwells
2013/11/13 07:41:27
Can we call this FULLSCREEN_TYPE_WINDOW_API? or FU
|
| + |
| + // 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, |
|
benwells
2013/11/13 07:41:27
This would also be better as FULLSCREEN_TYPE_HTML_
|
| + |
| + // 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); |
| @@ -305,6 +334,11 @@ class ShellWindow : public content::NotificationObserver, |
| return shell_window_contents_.get(); |
| } |
| + // Get the fullscreen type. |
| + FullscreenType fullscreen_type() const { |
| + return fullscreen_type_; |
| + } |
| + |
| // Get the size constraints. |
| const SizeConstraints& size_constraints() const { |
| return size_constraints_; |
| @@ -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_; |