| 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" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 public ShellObserver { | 31 public ShellObserver { |
| 32 public: | 32 public: |
| 33 // |target_widget| is the widget that the caption buttons act on. | 33 // |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 | 34 // |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 | 35 // 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. | 36 // 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. | 37 // However, clicking a caption button should act on the target widget. |
| 38 explicit HeaderView(views::Widget* target_widget); | 38 explicit HeaderView(views::Widget* target_widget); |
| 39 ~HeaderView() override; | 39 ~HeaderView() override; |
| 40 | 40 |
| 41 void set_is_immersive_delegate(bool value) { is_immersive_delegate_ = value; } |
| 42 |
| 41 // Schedules a repaint for the entire title. | 43 // Schedules a repaint for the entire title. |
| 42 void SchedulePaintForTitle(); | 44 void SchedulePaintForTitle(); |
| 43 | 45 |
| 44 // Tells the window controls to reset themselves to the normal state. | 46 // Tells the window controls to reset themselves to the normal state. |
| 45 void ResetWindowControls(); | 47 void ResetWindowControls(); |
| 46 | 48 |
| 47 // Returns the amount of the view's pixels which should be on screen. | 49 // Returns the amount of the view's pixels which should be on screen. |
| 48 int GetPreferredOnScreenHeight() const; | 50 int GetPreferredOnScreenHeight() const; |
| 49 | 51 |
| 50 // Returns the view's preferred height. | 52 // Returns the view's preferred height. |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 | 94 |
| 93 views::ImageView* avatar_icon_; | 95 views::ImageView* avatar_icon_; |
| 94 | 96 |
| 95 // View which contains the window caption buttons. | 97 // View which contains the window caption buttons. |
| 96 FrameCaptionButtonContainerView* caption_button_container_; | 98 FrameCaptionButtonContainerView* caption_button_container_; |
| 97 | 99 |
| 98 // The fraction of the header's height which is visible while in fullscreen. | 100 // The fraction of the header's height which is visible while in fullscreen. |
| 99 // This value is meaningless when not in fullscreen. | 101 // This value is meaningless when not in fullscreen. |
| 100 double fullscreen_visible_fraction_; | 102 double fullscreen_visible_fraction_; |
| 101 | 103 |
| 104 // Has this instance been set as the ImmersiveFullscreenControllerDelegate? |
| 105 bool is_immersive_delegate_ = true; |
| 106 |
| 102 DISALLOW_COPY_AND_ASSIGN(HeaderView); | 107 DISALLOW_COPY_AND_ASSIGN(HeaderView); |
| 103 }; | 108 }; |
| 104 | 109 |
| 105 } // namespace ash | 110 } // namespace ash |
| 106 | 111 |
| 107 #endif // ASH_COMMON_FRAME_HEADER_VIEW_H_ | 112 #endif // ASH_COMMON_FRAME_HEADER_VIEW_H_ |
| OLD | NEW |