OLD | NEW |
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/fixed_sized_scroll_view.h" | 7 #include "ash/common/system/tray/fixed_sized_scroll_view.h" |
8 #include "ash/common/system/tray/hover_highlight_view.h" | 8 #include "ash/common/system/tray/hover_highlight_view.h" |
9 #include "ash/common/system/tray/tray_constants.h" | 9 #include "ash/common/system/tray/tray_constants.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 // Align info item with checkbox items | 72 // Align info item with checkbox items |
73 int margin = | 73 int margin = |
74 kTrayPopupPaddingHorizontal + kTrayPopupDetailsLabelExtraLeftMargin; | 74 kTrayPopupPaddingHorizontal + kTrayPopupDetailsLabelExtraLeftMargin; |
75 int left_margin = 0; | 75 int left_margin = 0; |
76 int right_margin = 0; | 76 int right_margin = 0; |
77 if (base::i18n::IsRTL()) | 77 if (base::i18n::IsRTL()) |
78 right_margin = margin; | 78 right_margin = margin; |
79 else | 79 else |
80 left_margin = margin; | 80 left_margin = margin; |
81 | 81 |
82 label->SetBorder(views::Border::CreateEmptyBorder( | 82 label->SetBorder(views::CreateEmptyBorder( |
83 ash::kTrayPopupPaddingBetweenItems, left_margin, | 83 ash::kTrayPopupPaddingBetweenItems, left_margin, |
84 ash::kTrayPopupPaddingBetweenItems, right_margin)); | 84 ash::kTrayPopupPaddingBetweenItems, right_margin)); |
85 label->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 85 label->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
86 label->SetEnabledColor(SkColorSetARGB(192, 0, 0, 0)); | 86 label->SetEnabledColor(SkColorSetARGB(192, 0, 0, 0)); |
87 | 87 |
88 scroll_content()->AddChildView(label); | 88 scroll_content()->AddChildView(label); |
89 } | 89 } |
90 | 90 |
91 HoverHighlightView* AudioDetailedView::AddScrollListItem( | 91 HoverHighlightView* AudioDetailedView::AddScrollListItem( |
92 const base::string16& text, | 92 const base::string16& text, |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 AudioDeviceMap::iterator iter = device_map_.find(view); | 154 AudioDeviceMap::iterator iter = device_map_.find(view); |
155 if (iter == device_map_.end()) | 155 if (iter == device_map_.end()) |
156 return; | 156 return; |
157 chromeos::AudioDevice device = iter->second; | 157 chromeos::AudioDevice device = iter->second; |
158 CrasAudioHandler::Get()->SwitchToDevice(device, true, | 158 CrasAudioHandler::Get()->SwitchToDevice(device, true, |
159 CrasAudioHandler::ACTIVATE_BY_USER); | 159 CrasAudioHandler::ACTIVATE_BY_USER); |
160 } | 160 } |
161 | 161 |
162 } // namespace tray | 162 } // namespace tray |
163 } // namespace ash | 163 } // namespace ash |
OLD | NEW |