| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ASH_FRAME_CUSTOM_FRAME_VIEW_ASH_H_ | 5 #ifndef ASH_FRAME_CUSTOM_FRAME_VIEW_ASH_H_ |
| 6 #define ASH_FRAME_CUSTOM_FRAME_VIEW_ASH_H_ | 6 #define ASH_FRAME_CUSTOM_FRAME_VIEW_ASH_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "ui/views/window/non_client_view.h" | 10 #include "ui/views/window/non_client_view.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 virtual ~CustomFrameViewAsh(); | 35 virtual ~CustomFrameViewAsh(); |
| 36 | 36 |
| 37 // Inits |immersive_fullscreen_controller| so that the controller reveals | 37 // Inits |immersive_fullscreen_controller| so that the controller reveals |
| 38 // and hides |header_view_| in immersive fullscreen. | 38 // and hides |header_view_| in immersive fullscreen. |
| 39 // CustomFrameViewAsh does not take ownership of | 39 // CustomFrameViewAsh does not take ownership of |
| 40 // |immersive_fullscreen_controller|. | 40 // |immersive_fullscreen_controller|. |
| 41 void InitImmersiveFullscreenControllerForView( | 41 void InitImmersiveFullscreenControllerForView( |
| 42 ImmersiveFullscreenController* immersive_fullscreen_controller); | 42 ImmersiveFullscreenController* immersive_fullscreen_controller); |
| 43 | 43 |
| 44 // views::NonClientFrameView: | 44 // views::NonClientFrameView: |
| 45 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE; | 45 virtual gfx::Rect GetBoundsForClientView() const override; |
| 46 virtual gfx::Rect GetWindowBoundsForClientBounds( | 46 virtual gfx::Rect GetWindowBoundsForClientBounds( |
| 47 const gfx::Rect& client_bounds) const OVERRIDE; | 47 const gfx::Rect& client_bounds) const override; |
| 48 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE; | 48 virtual int NonClientHitTest(const gfx::Point& point) override; |
| 49 virtual void GetWindowMask(const gfx::Size& size, | 49 virtual void GetWindowMask(const gfx::Size& size, |
| 50 gfx::Path* window_mask) OVERRIDE; | 50 gfx::Path* window_mask) override; |
| 51 virtual void ResetWindowControls() OVERRIDE; | 51 virtual void ResetWindowControls() override; |
| 52 virtual void UpdateWindowIcon() OVERRIDE; | 52 virtual void UpdateWindowIcon() override; |
| 53 virtual void UpdateWindowTitle() OVERRIDE; | 53 virtual void UpdateWindowTitle() override; |
| 54 virtual void SizeConstraintsChanged() OVERRIDE; | 54 virtual void SizeConstraintsChanged() override; |
| 55 | 55 |
| 56 // views::View: | 56 // views::View: |
| 57 virtual gfx::Size GetPreferredSize() const OVERRIDE; | 57 virtual gfx::Size GetPreferredSize() const override; |
| 58 virtual const char* GetClassName() const OVERRIDE; | 58 virtual const char* GetClassName() const override; |
| 59 virtual gfx::Size GetMinimumSize() const OVERRIDE; | 59 virtual gfx::Size GetMinimumSize() const override; |
| 60 virtual gfx::Size GetMaximumSize() const OVERRIDE; | 60 virtual gfx::Size GetMaximumSize() const override; |
| 61 virtual void SchedulePaintInRect(const gfx::Rect& r) OVERRIDE; | 61 virtual void SchedulePaintInRect(const gfx::Rect& r) override; |
| 62 virtual void VisibilityChanged(views::View* starting_from, | 62 virtual void VisibilityChanged(views::View* starting_from, |
| 63 bool is_visible) OVERRIDE; | 63 bool is_visible) override; |
| 64 | 64 |
| 65 // Get the view of the header. | 65 // Get the view of the header. |
| 66 views::View* GetHeaderView(); | 66 views::View* GetHeaderView(); |
| 67 | 67 |
| 68 const views::View* GetAvatarIconViewForTest() const; | 68 const views::View* GetAvatarIconViewForTest() const; |
| 69 | 69 |
| 70 private: | 70 private: |
| 71 class OverlayView; | 71 class OverlayView; |
| 72 friend class TestWidgetConstraintsDelegate; | 72 friend class TestWidgetConstraintsDelegate; |
| 73 | 73 |
| 74 // views::NonClientFrameView: | 74 // views::NonClientFrameView: |
| 75 virtual bool DoesIntersectRect(const views::View* target, | 75 virtual bool DoesIntersectRect(const views::View* target, |
| 76 const gfx::Rect& rect) const OVERRIDE; | 76 const gfx::Rect& rect) const override; |
| 77 | 77 |
| 78 // Returns the container for the minimize/maximize/close buttons that is held | 78 // Returns the container for the minimize/maximize/close buttons that is held |
| 79 // by the HeaderView. Used in testing. | 79 // by the HeaderView. Used in testing. |
| 80 FrameCaptionButtonContainerView* GetFrameCaptionButtonContainerViewForTest(); | 80 FrameCaptionButtonContainerView* GetFrameCaptionButtonContainerViewForTest(); |
| 81 | 81 |
| 82 // Height from top of window to top of client area. | 82 // Height from top of window to top of client area. |
| 83 int NonClientTopBorderHeight() const; | 83 int NonClientTopBorderHeight() const; |
| 84 | 84 |
| 85 // Not owned. | 85 // Not owned. |
| 86 views::Widget* frame_; | 86 views::Widget* frame_; |
| 87 | 87 |
| 88 // View which contains the title and window controls. | 88 // View which contains the title and window controls. |
| 89 class HeaderView; | 89 class HeaderView; |
| 90 HeaderView* header_view_; | 90 HeaderView* header_view_; |
| 91 | 91 |
| 92 // Updates the hittest bounds overrides based on the window state type. | 92 // Updates the hittest bounds overrides based on the window state type. |
| 93 scoped_ptr<FrameBorderHitTestController> frame_border_hit_test_controller_; | 93 scoped_ptr<FrameBorderHitTestController> frame_border_hit_test_controller_; |
| 94 | 94 |
| 95 DISALLOW_COPY_AND_ASSIGN(CustomFrameViewAsh); | 95 DISALLOW_COPY_AND_ASSIGN(CustomFrameViewAsh); |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 } // namespace ash | 98 } // namespace ash |
| 99 | 99 |
| 100 #endif // ASH_FRAME_CUSTOM_FRAME_VIEW_ASH_H_ | 100 #endif // ASH_FRAME_CUSTOM_FRAME_VIEW_ASH_H_ |
| OLD | NEW |