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_COMMON_FRAME_CUSTOM_FRAME_VIEW_ASH_H_ | 5 #ifndef ASH_COMMON_FRAME_CUSTOM_FRAME_VIEW_ASH_H_ |
6 #define ASH_COMMON_FRAME_CUSTOM_FRAME_VIEW_ASH_H_ | 6 #define ASH_COMMON_FRAME_CUSTOM_FRAME_VIEW_ASH_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "third_party/skia/include/core/SkColor.h" | 12 #include "third_party/skia/include/core/SkColor.h" |
13 #include "ui/views/window/non_client_view.h" | 13 #include "ui/views/window/non_client_view.h" |
14 | 14 |
15 namespace views { | 15 namespace views { |
16 class Widget; | 16 class Widget; |
17 } | 17 } |
18 | 18 |
19 namespace ash { | 19 namespace ash { |
20 | 20 |
21 class FrameCaptionButtonContainerView; | 21 class FrameCaptionButtonContainerView; |
22 class HeaderView; | 22 class HeaderView; |
23 class WmImmersiveFullscreenController; | 23 class ImmersiveFullscreenController; |
24 | 24 |
25 // A NonClientFrameView used for packaged apps, dialogs and other non-browser | 25 // A NonClientFrameView used for packaged apps, dialogs and other non-browser |
26 // windows. It supports immersive fullscreen. When in immersive fullscreen, the | 26 // windows. It supports immersive fullscreen. When in immersive fullscreen, the |
27 // client view takes up the entire widget and the window header is an overlay. | 27 // client view takes up the entire widget and the window header is an overlay. |
28 // The window header overlay slides onscreen when the user hovers the mouse at | 28 // The window header overlay slides onscreen when the user hovers the mouse at |
29 // the top of the screen. See also views::CustomFrameView and | 29 // the top of the screen. See also views::CustomFrameView and |
30 // BrowserNonClientFrameViewAsh. | 30 // BrowserNonClientFrameViewAsh. |
31 class ASH_EXPORT CustomFrameViewAsh : public views::NonClientFrameView { | 31 class ASH_EXPORT CustomFrameViewAsh : public views::NonClientFrameView { |
32 public: | 32 public: |
33 // Internal class name. | 33 // Internal class name. |
34 static const char kViewClassName[]; | 34 static const char kViewClassName[]; |
35 | 35 |
36 explicit CustomFrameViewAsh(views::Widget* frame); | 36 explicit CustomFrameViewAsh(views::Widget* frame); |
37 ~CustomFrameViewAsh() override; | 37 ~CustomFrameViewAsh() override; |
38 | 38 |
39 // Inits |immersive_fullscreen_controller| so that the controller reveals | 39 // Inits |immersive_fullscreen_controller| so that the controller reveals |
40 // and hides |header_view_| in immersive fullscreen. | 40 // and hides |header_view_| in immersive fullscreen. |
41 // CustomFrameViewAsh does not take ownership of | 41 // CustomFrameViewAsh does not take ownership of |
42 // |immersive_fullscreen_controller|. | 42 // |immersive_fullscreen_controller|. |
43 void InitImmersiveFullscreenControllerForView( | 43 void InitImmersiveFullscreenControllerForView( |
44 WmImmersiveFullscreenController* immersive_fullscreen_controller); | 44 ImmersiveFullscreenController* immersive_fullscreen_controller); |
45 | 45 |
46 // Sets the active and inactive frame colors. Note the inactive frame color | 46 // Sets the active and inactive frame colors. Note the inactive frame color |
47 // will have some transparency added when the frame is drawn. | 47 // will have some transparency added when the frame is drawn. |
48 void SetFrameColors(SkColor active_frame_color, SkColor inactive_frame_color); | 48 void SetFrameColors(SkColor active_frame_color, SkColor inactive_frame_color); |
49 | 49 |
50 // views::NonClientFrameView: | 50 // views::NonClientFrameView: |
51 gfx::Rect GetBoundsForClientView() const override; | 51 gfx::Rect GetBoundsForClientView() const override; |
52 gfx::Rect GetWindowBoundsForClientBounds( | 52 gfx::Rect GetWindowBoundsForClientBounds( |
53 const gfx::Rect& client_bounds) const override; | 53 const gfx::Rect& client_bounds) const override; |
54 int NonClientHitTest(const gfx::Point& point) override; | 54 int NonClientHitTest(const gfx::Point& point) override; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 | 93 |
94 // View which contains the title and window controls. | 94 // View which contains the title and window controls. |
95 HeaderView* header_view_; | 95 HeaderView* header_view_; |
96 | 96 |
97 DISALLOW_COPY_AND_ASSIGN(CustomFrameViewAsh); | 97 DISALLOW_COPY_AND_ASSIGN(CustomFrameViewAsh); |
98 }; | 98 }; |
99 | 99 |
100 } // namespace ash | 100 } // namespace ash |
101 | 101 |
102 #endif // ASH_COMMON_FRAME_CUSTOM_FRAME_VIEW_ASH_H_ | 102 #endif // ASH_COMMON_FRAME_CUSTOM_FRAME_VIEW_ASH_H_ |
OLD | NEW |