| 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_SYSTEM_TRAY_TRI_VIEW_H_ | 5 #ifndef ASH_SYSTEM_TRAY_TRI_VIEW_H_ |
| 6 #define ASH_SYSTEM_TRAY_TRI_VIEW_H_ | 6 #define ASH_SYSTEM_TRAY_TRI_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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 // before allocating the remaining space to the container views. | 94 // before allocating the remaining space to the container views. |
| 95 void SetInsets(const gfx::Insets& insets); | 95 void SetInsets(const gfx::Insets& insets); |
| 96 | 96 |
| 97 // Sets the border for the given |container|. | 97 // Sets the border for the given |container|. |
| 98 void SetContainerBorder(Container container, | 98 void SetContainerBorder(Container container, |
| 99 std::unique_ptr<views::Border> border); | 99 std::unique_ptr<views::Border> border); |
| 100 | 100 |
| 101 // Sets whether the |container| is visible. During a layout the space will be | 101 // Sets whether the |container| is visible. During a layout the space will be |
| 102 // allocated to the visible containers only. i.e. non-visible containers will | 102 // allocated to the visible containers only. i.e. non-visible containers will |
| 103 // not be allocated any space. | 103 // not be allocated any space. |
| 104 // Note: This will cause a relayout. |
| 104 void SetContainerVisible(Container container, bool visible); | 105 void SetContainerVisible(Container container, bool visible); |
| 105 | 106 |
| 106 // Sets the flex weight for the given |container|. Using the preferred size as | 107 // Sets the flex weight for the given |container|. Using the preferred size as |
| 107 // the basis, free space along the main axis is distributed to views in the | 108 // the basis, free space along the main axis is distributed to views in the |
| 108 // ratio of their flex weights. Similarly, if the views will overflow the | 109 // ratio of their flex weights. Similarly, if the views will overflow the |
| 109 // parent, space is subtracted in these ratios. | 110 // parent, space is subtracted in these ratios. |
| 110 // | 111 // |
| 111 // A flex of 0 means this view is not resized. Flex values must not be | 112 // A flex of 0 means this view is not resized. Flex values must not be |
| 112 // negative. | 113 // negative. |
| 113 // | 114 // |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 // to manipulate the child views during construction/destruction so this flag | 149 // to manipulate the child views during construction/destruction so this flag |
| 149 // is used to disable the DCHECK during construction/destruction. | 150 // is used to disable the DCHECK during construction/destruction. |
| 150 bool enable_hierarchy_changed_dcheck_ = false; | 151 bool enable_hierarchy_changed_dcheck_ = false; |
| 151 | 152 |
| 152 DISALLOW_COPY_AND_ASSIGN(TriView); | 153 DISALLOW_COPY_AND_ASSIGN(TriView); |
| 153 }; | 154 }; |
| 154 | 155 |
| 155 } // namespace ash | 156 } // namespace ash |
| 156 | 157 |
| 157 #endif // ASH_SYSTEM_TRAY_TRI_VIEW_H_ | 158 #endif // ASH_SYSTEM_TRAY_TRI_VIEW_H_ |
| OLD | NEW |