OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_HEADER_VIEW_H_ | 5 #ifndef ASH_COMMON_FRAME_HEADER_VIEW_H_ |
6 #define ASH_COMMON_FRAME_HEADER_VIEW_H_ | 6 #define ASH_COMMON_FRAME_HEADER_VIEW_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 "ash/common/shell_observer.h" | 11 #include "ash/common/shell_observer.h" |
| 12 #include "ash/public/interfaces/window_style.mojom.h" |
12 #include "ash/shared/immersive_fullscreen_controller_delegate.h" | 13 #include "ash/shared/immersive_fullscreen_controller_delegate.h" |
13 #include "base/macros.h" | 14 #include "base/macros.h" |
14 #include "third_party/skia/include/core/SkColor.h" | 15 #include "third_party/skia/include/core/SkColor.h" |
15 #include "ui/views/view.h" | 16 #include "ui/views/view.h" |
16 | 17 |
17 namespace views { | 18 namespace views { |
18 class ImageView; | 19 class ImageView; |
19 class Widget; | 20 class Widget; |
20 } | 21 } |
21 | 22 |
22 namespace ash { | 23 namespace ash { |
23 | 24 |
24 class DefaultHeaderPainter; | 25 class DefaultHeaderPainter; |
25 class FrameCaptionButtonContainerView; | 26 class FrameCaptionButtonContainerView; |
26 | 27 |
27 // View which paints the frame header (title, caption buttons...). It slides off | 28 // View which paints the frame header (title, caption buttons...). It slides off |
28 // and on screen in immersive fullscreen. | 29 // and on screen in immersive fullscreen. |
29 class ASH_EXPORT HeaderView : public views::View, | 30 class ASH_EXPORT HeaderView : public views::View, |
30 public ImmersiveFullscreenControllerDelegate, | 31 public ImmersiveFullscreenControllerDelegate, |
31 public ShellObserver { | 32 public ShellObserver { |
32 public: | 33 public: |
33 // |target_widget| is the widget that the caption buttons act on. | 34 // |target_widget| is the widget that the caption buttons act on. |
34 // |target_widget| is not necessarily the same as the widget the header is | 35 // |target_widget| is not necessarily the same as the widget the header is |
35 // placed in. For example, in immersive fullscreen this view may be painted in | 36 // placed in. For example, in immersive fullscreen this view may be painted in |
36 // a widget that slides in and out on top of the main app or browser window. | 37 // a widget that slides in and out on top of the main app or browser window. |
37 // However, clicking a caption button should act on the target widget. | 38 // However, clicking a caption button should act on the target widget. |
38 explicit HeaderView(views::Widget* target_widget); | 39 explicit HeaderView( |
| 40 views::Widget* target_widget, |
| 41 mojom::WindowStyle window_style = mojom::WindowStyle::DEFAULT); |
39 ~HeaderView() override; | 42 ~HeaderView() override; |
40 | 43 |
41 void set_is_immersive_delegate(bool value) { is_immersive_delegate_ = value; } | 44 void set_is_immersive_delegate(bool value) { is_immersive_delegate_ = value; } |
42 | 45 |
43 // Schedules a repaint for the entire title. | 46 // Schedules a repaint for the entire title. |
44 void SchedulePaintForTitle(); | 47 void SchedulePaintForTitle(); |
45 | 48 |
46 // Tells the window controls to reset themselves to the normal state. | 49 // Tells the window controls to reset themselves to the normal state. |
47 void ResetWindowControls(); | 50 void ResetWindowControls(); |
48 | 51 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 bool is_immersive_delegate_ = true; | 110 bool is_immersive_delegate_ = true; |
108 | 111 |
109 bool did_layout_ = false; | 112 bool did_layout_ = false; |
110 | 113 |
111 DISALLOW_COPY_AND_ASSIGN(HeaderView); | 114 DISALLOW_COPY_AND_ASSIGN(HeaderView); |
112 }; | 115 }; |
113 | 116 |
114 } // namespace ash | 117 } // namespace ash |
115 | 118 |
116 #endif // ASH_COMMON_FRAME_HEADER_VIEW_H_ | 119 #endif // ASH_COMMON_FRAME_HEADER_VIEW_H_ |
OLD | NEW |