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

Side by Side Diff: ash/system/bluetooth/tray_bluetooth.cc

Issue 10837067: Add accessible names to buttons in the Uber tray (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | ash/system/date/tray_date.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/bluetooth/tray_bluetooth.h" 5 #include "ash/system/bluetooth/tray_bluetooth.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/system/tray/system_tray.h" 8 #include "ash/system/tray/system_tray.h"
9 #include "ash/system/tray/system_tray_delegate.h" 9 #include "ash/system/tray/system_tray_delegate.h"
10 #include "ash/system/tray/tray_constants.h" 10 #include "ash/system/tray/tray_constants.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 if (login_ == user::LOGGED_IN_LOCKED) 92 if (login_ == user::LOGGED_IN_LOCKED)
93 return; 93 return;
94 94
95 // Do not allow toggling bluetooth in the lock screen. 95 // Do not allow toggling bluetooth in the lock screen.
96 ash::SystemTrayDelegate* delegate = 96 ash::SystemTrayDelegate* delegate =
97 ash::Shell::GetInstance()->tray_delegate(); 97 ash::Shell::GetInstance()->tray_delegate();
98 toggle_bluetooth_ = new TrayPopupHeaderButton(this, 98 toggle_bluetooth_ = new TrayPopupHeaderButton(this,
99 IDR_AURA_UBER_TRAY_BLUETOOTH_ENABLED, 99 IDR_AURA_UBER_TRAY_BLUETOOTH_ENABLED,
100 IDR_AURA_UBER_TRAY_BLUETOOTH_DISABLED, 100 IDR_AURA_UBER_TRAY_BLUETOOTH_DISABLED,
101 IDR_AURA_UBER_TRAY_BLUETOOTH_ENABLED_HOVER, 101 IDR_AURA_UBER_TRAY_BLUETOOTH_ENABLED_HOVER,
102 IDR_AURA_UBER_TRAY_BLUETOOTH_DISABLED_HOVER); 102 IDR_AURA_UBER_TRAY_BLUETOOTH_DISABLED_HOVER,
103 IDS_ASH_STATUS_TRAY_BLUETOOTH);
103 toggle_bluetooth_->SetToggled(!delegate->GetBluetoothEnabled()); 104 toggle_bluetooth_->SetToggled(!delegate->GetBluetoothEnabled());
104 footer()->AddButton(toggle_bluetooth_); 105 footer()->AddButton(toggle_bluetooth_);
105 } 106 }
106 107
107 void AppendDeviceList(const BluetoothDeviceList& list) { 108 void AppendDeviceList(const BluetoothDeviceList& list) {
108 device_map_.clear(); 109 device_map_.clear();
109 CreateScrollableList(); 110 CreateScrollableList();
110 111
111 for (size_t i = 0; i < list.size(); i++) { 112 for (size_t i = 0; i < list.size(); i++) {
112 HoverHighlightView* container = new HoverHighlightView(this); 113 HoverHighlightView* container = new HoverHighlightView(this);
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 BluetoothDeviceList list; 224 BluetoothDeviceList list;
224 Shell::GetInstance()->tray_delegate()->GetAvailableBluetoothDevices(&list); 225 Shell::GetInstance()->tray_delegate()->GetAvailableBluetoothDevices(&list);
225 if (default_) 226 if (default_)
226 default_->UpdateLabel(); 227 default_->UpdateLabel();
227 else if (detailed_) 228 else if (detailed_)
228 detailed_->Update(list); 229 detailed_->Update(list);
229 } 230 }
230 231
231 } // namespace internal 232 } // namespace internal
232 } // namespace ash 233 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/system/date/tray_date.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698