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

Side by Side Diff: ash/common/system/chromeos/audio/audio_detailed_view.cc

Issue 2795143005: [Ash] Remove pre-MD code paths from HoverHighlightView (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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/chromeos/audio/audio_detailed_view.h" 5 #include "ash/common/system/chromeos/audio/audio_detailed_view.h"
6 6
7 #include "ash/common/system/tray/hover_highlight_view.h" 7 #include "ash/common/system/tray/hover_highlight_view.h"
8 #include "ash/common/system/tray/tray_popup_utils.h" 8 #include "ash/common/system/tray/tray_popup_utils.h"
9 #include "ash/common/system/tray/tri_view.h" 9 #include "ash/common/system/tray/tri_view.h"
10 #include "ash/resources/vector_icons/vector_icons.h" 10 #include "ash/resources/vector_icons/vector_icons.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 header->SetContainerVisible(TriView::Container::END, false); 102 header->SetContainerVisible(TriView::Container::END, false);
103 scroll_content()->AddChildView(header); 103 scroll_content()->AddChildView(header);
104 } 104 }
105 105
106 HoverHighlightView* AudioDetailedView::AddScrollListItem( 106 HoverHighlightView* AudioDetailedView::AddScrollListItem(
107 const base::string16& text, 107 const base::string16& text,
108 bool highlight, 108 bool highlight,
109 bool checked) { 109 bool checked) {
110 HoverHighlightView* container = new HoverHighlightView(this); 110 HoverHighlightView* container = new HoverHighlightView(this);
111 111
112 container->AddLabelRowMd(text); 112 container->AddLabelRow(text);
113 if (checked) { 113 if (checked) {
114 gfx::ImageSkia check_mark = 114 gfx::ImageSkia check_mark =
115 gfx::CreateVectorIcon(kCheckCircleIcon, gfx::kGoogleGreen700); 115 gfx::CreateVectorIcon(kCheckCircleIcon, gfx::kGoogleGreen700);
116 container->AddRightIcon(check_mark, check_mark.width()); 116 container->AddRightIcon(check_mark, check_mark.width());
117 container->SetRightViewVisible(true); 117 container->SetRightViewVisible(true);
118 container->SetAccessiblityState( 118 container->SetAccessiblityState(
119 HoverHighlightView::AccessibilityState::CHECKED_CHECKBOX); 119 HoverHighlightView::AccessibilityState::CHECKED_CHECKBOX);
120 } else { 120 } else {
121 container->SetAccessiblityState( 121 container->SetAccessiblityState(
122 HoverHighlightView::AccessibilityState::UNCHECKED_CHECKBOX); 122 HoverHighlightView::AccessibilityState::UNCHECKED_CHECKBOX);
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 audio_handler->HasDualInternalMic()) { 219 audio_handler->HasDualInternalMic()) {
220 audio_handler->SwitchToFrontOrRearMic(); 220 audio_handler->SwitchToFrontOrRearMic();
221 } else { 221 } else {
222 audio_handler->SwitchToDevice(device, true, 222 audio_handler->SwitchToDevice(device, true,
223 CrasAudioHandler::ACTIVATE_BY_USER); 223 CrasAudioHandler::ACTIVATE_BY_USER);
224 } 224 }
225 } 225 }
226 226
227 } // namespace tray 227 } // namespace tray
228 } // namespace ash 228 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698