Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: ash/common/system/tray/tri_view.cc

Issue 2468533002: [ash-md] Applied Material Design layout to TrayItemMore system menu rows. (Closed)
Patch Set: Merge branch 'master' into md_system_menu_tray_item_more_layout Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/common/system/tray/tray_popup_utils.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/common/system/tray/tri_view.h" 5 #include "ash/common/system/tray/tri_view.h"
6 6
7 #include "ash/common/system/tray/size_range_layout.h" 7 #include "ash/common/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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 } 105 }
106 106
107 void TriView::SetFlexForContainer(Container container, int flex) { 107 void TriView::SetFlexForContainer(Container container, int flex) {
108 box_layout_->SetFlexForView(GetContainer(container), flex); 108 box_layout_->SetFlexForView(GetContainer(container), flex);
109 } 109 }
110 110
111 void TriView::SetContainerLayout( 111 void TriView::SetContainerLayout(
112 Container container, 112 Container container,
113 std::unique_ptr<views::LayoutManager> layout_manager) { 113 std::unique_ptr<views::LayoutManager> layout_manager) {
114 GetLayoutManager(container)->SetLayoutManager(std::move(layout_manager)); 114 GetLayoutManager(container)->SetLayoutManager(std::move(layout_manager));
115 if (GetLayoutManager(container))
116 GetLayoutManager(container)->Installed(GetContainer(container));
117 } 115 }
118 116
119 void TriView::ViewHierarchyChanged( 117 void TriView::ViewHierarchyChanged(
120 const views::View::ViewHierarchyChangedDetails& details) { 118 const views::View::ViewHierarchyChangedDetails& details) {
121 views::View::ViewHierarchyChanged(details); 119 views::View::ViewHierarchyChanged(details);
122 if (!enable_hierarchy_changed_dcheck_) 120 if (!enable_hierarchy_changed_dcheck_)
123 return; 121 return;
124 122
125 if (details.parent == this) { 123 if (details.parent == this) {
126 if (details.is_add) { 124 if (details.is_add) {
(...skipping 29 matching lines...) Expand all
156 return center_container_layout_manager_; 154 return center_container_layout_manager_;
157 case Container::END: 155 case Container::END:
158 return end_container_layout_manager_; 156 return end_container_layout_manager_;
159 } 157 }
160 // Required for some compilers. 158 // Required for some compilers.
161 NOTREACHED(); 159 NOTREACHED();
162 return nullptr; 160 return nullptr;
163 } 161 }
164 162
165 } // namespace ash 163 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/tray/tray_popup_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698