diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-19 02:08:17 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-19 02:08:17 +0000 |
commit | 44c10a8cd1ade56e9be8b76b0dc105ad312804b9 (patch) | |
tree | 4e61f399f81170298a6e5a00cedfbec8a367d6b1 /ash/wm/custom_frame_view_ash.h | |
parent | 479af6862c431082a4375ee9ad6d820ed908d5ef (diff) | |
download | chromium_src-44c10a8cd1ade56e9be8b76b0dc105ad312804b9.zip chromium_src-44c10a8cd1ade56e9be8b76b0dc105ad312804b9.tar.gz chromium_src-44c10a8cd1ade56e9be8b76b0dc105ad312804b9.tar.bz2 |
Revert 235861 "Add ash-enable-immersive-all-windows command line..."
> Add ash-enable-immersive-all-windows command line flag to enable immersive fullscreen for non-frameless v2 apps. (The goal is to add support for immersive fullscreen for v1 apps and miscellaneous windows such as the task manager shortly) When the flag is set, <F4> will put the app into immersive fullscreen.
>
> In immersive fullscreen, the window header (the title bar and window controls) slide out as an overlay over the web contents when the mouse is hovered at the top of the display.
>
> chrome.app.window.current().isFullscreen() returns false for immersive fullscreen windows
> Entering fullscreen via the app.window api or webkitRequestFullScreen() quits immersive fullscreen.
>
> BUG=307622
> R=oshima,benwells
> TBR=sky (For adding VIEWS_EXPORT to ui/views/widget/widget_observer.h)
> TEST=Manual, see steps below:
> 1) Install: https://chrome.google.com/webstore/detail/window-state-sample/hcbhfbnaaancmblfhdknlnojpafjohbi
> 2) Enable "Enable immersive fullscreen for non browser windows" in chrome://flags
> 3) Hit <F4>
> 4) Ensure that the "isFullscreen" checkbox in the app is checked
> 5) Ensure that the shelf light bar is visible (The shelf is not completely hidden)
> 6) Hover the mouse at the top of the screen. Ensure that the window header (maximize and close button slide down and overlay the web contents)
> 7) Move the mouse off of the header. Ensure that the window header slides off screen
> 8) Press the Fullscreen button in the app (It may be useful to set the "chrome.app.window actions delay" to zero seconds)
> 9) Ensure that the shelf is completely hidden.
> 10) Hover the mouse at the top of the screen. Ensure that the header slides out again.
> 11) Press <F4>
> 12) Ensure that the "isFullscreen" checkbox is unchecked
> 13) Ensure that the window header is visible and does not slide out
>
> Review URL: https://codereview.chromium.org/59043013
BUG=307622,320938
TBR=pkotwicz@chromium.org
Review URL: https://codereview.chromium.org/73623008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235895 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/wm/custom_frame_view_ash.h')
-rw-r--r-- | ash/wm/custom_frame_view_ash.h | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/ash/wm/custom_frame_view_ash.h b/ash/wm/custom_frame_view_ash.h index 7c58a1e..9593abb 100644 --- a/ash/wm/custom_frame_view_ash.h +++ b/ash/wm/custom_frame_view_ash.h @@ -12,7 +12,6 @@ namespace ash { class FrameBorderHitTestController; class HeaderPainter; -class ImmersiveFullscreenController; } namespace gfx { class Font; @@ -23,12 +22,10 @@ class Widget; namespace ash { -// A NonClientFrameView used for packaged apps, dialogs and other non-browser -// windows. It supports immersive fullscreen. When in immersive fullscreen, the -// client view takes up the entire widget and the window header is an overlay. -// The window header overlay slides onscreen when the user hovers the mouse at -// the top of the screen. See also views::CustomFrameView and -// BrowserNonClientFrameViewAsh. +class FrameCaptionButtonContainerView; + +// A NonClientFrameView used for dialogs and other non-browser windows. +// See also views::CustomFrameView and BrowserNonClientFrameViewAsh. class ASH_EXPORT CustomFrameViewAsh : public views::NonClientFrameView { public: // Internal class name. @@ -37,13 +34,6 @@ class ASH_EXPORT CustomFrameViewAsh : public views::NonClientFrameView { explicit CustomFrameViewAsh(views::Widget* frame); virtual ~CustomFrameViewAsh(); - // Inits |immersive_fullscreen_controller| so that the controller reveals - // and hides |header_view_| in immersive fullscreen. - // CustomFrameViewAsh does not take ownership of - // |immersive_fullscreen_controller|. - void InitImmersiveFullscreenControllerForView( - ImmersiveFullscreenController* immersive_fullscreen_controller); - // views::NonClientFrameView overrides: virtual gfx::Rect GetBoundsForClientView() const OVERRIDE; virtual gfx::Rect GetWindowBoundsForClientBounds( @@ -57,24 +47,24 @@ class ASH_EXPORT CustomFrameViewAsh : public views::NonClientFrameView { // views::View overrides: virtual gfx::Size GetPreferredSize() OVERRIDE; + virtual void Layout() OVERRIDE; virtual const char* GetClassName() const OVERRIDE; + virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; virtual gfx::Size GetMinimumSize() OVERRIDE; virtual gfx::Size GetMaximumSize() OVERRIDE; - virtual void SchedulePaintInRect(const gfx::Rect& r) OVERRIDE; - virtual bool HitTestRect(const gfx::Rect& rect) const OVERRIDE; private: - class OverlayView; - // Height from top of window to top of client area. int NonClientTopBorderHeight() const; // Not owned. views::Widget* frame_; - // View which contains the title and window controls. - class HeaderView; - HeaderView* header_view_; + // View which contains the window controls. + FrameCaptionButtonContainerView* caption_button_container_; + + // Helper class for painting the header. + scoped_ptr<HeaderPainter> header_painter_; // Updates the hittest bounds overrides based on the window show type. scoped_ptr<FrameBorderHitTestController> frame_border_hit_test_controller_; |