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

Side by Side Diff: ash/system/tray/tray_popup_utils.cc

Issue 2829763002: [Ash] Remove HoverHighlightView::AddLabelDeprecated() (Closed)
Patch Set: Created 3 years, 8 months 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/system/tray/tray_popup_utils.h ('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/system/tray/tray_popup_utils.h" 5 #include "ash/system/tray/tray_popup_utils.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "ash/ash_constants.h" 10 #include "ash/ash_constants.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 TriView* TrayPopupUtils::CreateSubHeaderRowView() { 177 TriView* TrayPopupUtils::CreateSubHeaderRowView() {
178 TriView* tri_view = CreateMultiTargetRowView(); 178 TriView* tri_view = CreateMultiTargetRowView();
179 tri_view->SetInsets(gfx::Insets(0, kTrayPopupPaddingHorizontal, 0, 0)); 179 tri_view->SetInsets(gfx::Insets(0, kTrayPopupPaddingHorizontal, 0, 0));
180 tri_view->SetContainerVisible(TriView::Container::START, false); 180 tri_view->SetContainerVisible(TriView::Container::START, false);
181 tri_view->SetContainerLayout( 181 tri_view->SetContainerLayout(
182 TriView::Container::END, 182 TriView::Container::END,
183 CreateDefaultLayoutManager(TriView::Container::END)); 183 CreateDefaultLayoutManager(TriView::Container::END));
184 return tri_view; 184 return tri_view;
185 } 185 }
186 186
187 views::View* TrayPopupUtils::CreateInfoLabelRowView(int message_id) {
188 views::Label* label = TrayPopupUtils::CreateDefaultLabel();
189 label->SetText(l10n_util::GetStringUTF16(message_id));
190 TrayPopupItemStyle style(TrayPopupItemStyle::FontStyle::SYSTEM_INFO);
191 style.SetupLabel(label);
192
193 TriView* tri_view = CreateMultiTargetRowView();
194 tri_view->SetInsets(gfx::Insets(0, kTrayPopupPaddingHorizontal, 0, 0));
195 tri_view->SetContainerVisible(TriView::Container::START, false);
196 tri_view->SetContainerVisible(TriView::Container::END, false);
197 tri_view->AddView(TriView::Container::CENTER, label);
198
199 return tri_view;
200 }
201
187 TriView* TrayPopupUtils::CreateMultiTargetRowView() { 202 TriView* TrayPopupUtils::CreateMultiTargetRowView() {
188 TriView* tri_view = new TriView(0 /* padding_between_items */); 203 TriView* tri_view = new TriView(0 /* padding_between_items */);
189 204
190 tri_view->SetInsets(gfx::Insets(0, kMenuExtraMarginFromLeftEdge, 0, 0)); 205 tri_view->SetInsets(gfx::Insets(0, kMenuExtraMarginFromLeftEdge, 0, 0));
191 206
192 ConfigureDefaultSizeAndFlex(tri_view, TriView::Container::START); 207 ConfigureDefaultSizeAndFlex(tri_view, TriView::Container::START);
193 ConfigureDefaultSizeAndFlex(tri_view, TriView::Container::CENTER); 208 ConfigureDefaultSizeAndFlex(tri_view, TriView::Container::CENTER);
194 ConfigureDefaultSizeAndFlex(tri_view, TriView::Container::END); 209 ConfigureDefaultSizeAndFlex(tri_view, TriView::Container::END);
195 210
196 tri_view->SetContainerLayout(TriView::Container::START, 211 tri_view->SetContainerLayout(TriView::Container::START,
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 456
442 void TrayPopupUtils::UpdateCheckMarkVisibility(HoverHighlightView* container, 457 void TrayPopupUtils::UpdateCheckMarkVisibility(HoverHighlightView* container,
443 bool visible) { 458 bool visible) {
444 container->SetRightViewVisible(visible); 459 container->SetRightViewVisible(visible);
445 container->SetAccessiblityState( 460 container->SetAccessiblityState(
446 visible ? HoverHighlightView::AccessibilityState::CHECKED_CHECKBOX 461 visible ? HoverHighlightView::AccessibilityState::CHECKED_CHECKBOX
447 : HoverHighlightView::AccessibilityState::UNCHECKED_CHECKBOX); 462 : HoverHighlightView::AccessibilityState::UNCHECKED_CHECKBOX);
448 } 463 }
449 464
450 } // namespace ash 465 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/tray/tray_popup_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698