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

Unified Diff: ash/wm/custom_frame_view_ash.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
« no previous file with comments | « ash/wm/caption_buttons/maximize_bubble_controller.cc ('k') | ash/wm/custom_frame_view_ash.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/custom_frame_view_ash.h
diff --git a/ash/wm/custom_frame_view_ash.h b/ash/wm/custom_frame_view_ash.h
index 9593abbe70cb216c1d009f5c086606021d149bcd..7c58a1ed449190e1e5507669e0c40ce09a2fc544 100644
--- a/ash/wm/custom_frame_view_ash.h
+++ b/ash/wm/custom_frame_view_ash.h
@@ -12,6 +12,7 @@
namespace ash {
class FrameBorderHitTestController;
class HeaderPainter;
+class ImmersiveFullscreenController;
}
namespace gfx {
class Font;
@@ -22,10 +23,12 @@ class Widget;
namespace ash {
-class FrameCaptionButtonContainerView;
-
-// A NonClientFrameView used for dialogs and other non-browser windows.
-// See also views::CustomFrameView and BrowserNonClientFrameViewAsh.
+// 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 ASH_EXPORT CustomFrameViewAsh : public views::NonClientFrameView {
public:
// Internal class name.
@@ -34,6 +37,13 @@ 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(
@@ -47,24 +57,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 window controls.
- FrameCaptionButtonContainerView* caption_button_container_;
-
- // Helper class for painting the header.
- scoped_ptr<HeaderPainter> header_painter_;
+ // View which contains the title and window controls.
+ class HeaderView;
+ HeaderView* header_view_;
// Updates the hittest bounds overrides based on the window show type.
scoped_ptr<FrameBorderHitTestController> frame_border_hit_test_controller_;
« no previous file with comments | « ash/wm/caption_buttons/maximize_bubble_controller.cc ('k') | ash/wm/custom_frame_view_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698