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 #include "ash/system/tray/tri_view.h" | 5 #include "ash/system/tray/tri_view.h" |
6 | 6 |
7 #include "ash/system/tray/size_range_layout.h" | 7 #include "ash/system/tray/size_range_layout.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "ui/views/border.h" | 9 #include "ui/views/border.h" |
10 #include "ui/views/layout/box_layout.h" | 10 #include "ui/views/layout/box_layout.h" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 } | 103 } |
104 | 104 |
105 void TriView::SetMaxSize(Container container, const gfx::Size& size) { | 105 void TriView::SetMaxSize(Container container, const gfx::Size& size) { |
106 GetLayoutManager(container)->SetMaxSize(size); | 106 GetLayoutManager(container)->SetMaxSize(size); |
107 } | 107 } |
108 | 108 |
109 void TriView::AddView(Container container, views::View* view) { | 109 void TriView::AddView(Container container, views::View* view) { |
110 GetContainer(container)->AddChildView(view); | 110 GetContainer(container)->AddChildView(view); |
111 } | 111 } |
112 | 112 |
| 113 void TriView::RemoveView(Container container, views::View* view) { |
| 114 GetContainer(container)->RemoveChildView(view); |
| 115 } |
| 116 |
113 void TriView::RemoveAllChildren(Container container, bool delete_children) { | 117 void TriView::RemoveAllChildren(Container container, bool delete_children) { |
114 GetContainer(container)->RemoveAllChildViews(delete_children); | 118 GetContainer(container)->RemoveAllChildViews(delete_children); |
115 } | 119 } |
116 | 120 |
117 void TriView::SetInsets(const gfx::Insets& insets) { | 121 void TriView::SetInsets(const gfx::Insets& insets) { |
118 box_layout_->set_inside_border_insets(insets); | 122 box_layout_->set_inside_border_insets(insets); |
119 } | 123 } |
120 | 124 |
121 void TriView::SetContainerBorder(Container container, | 125 void TriView::SetContainerBorder(Container container, |
122 std::unique_ptr<views::Border> border) { | 126 std::unique_ptr<views::Border> border) { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 return center_container_layout_manager_; | 174 return center_container_layout_manager_; |
171 case Container::END: | 175 case Container::END: |
172 return end_container_layout_manager_; | 176 return end_container_layout_manager_; |
173 } | 177 } |
174 // Required for some compilers. | 178 // Required for some compilers. |
175 NOTREACHED(); | 179 NOTREACHED(); |
176 return nullptr; | 180 return nullptr; |
177 } | 181 } |
178 | 182 |
179 } // namespace ash | 183 } // namespace ash |
OLD | NEW |