OLD | NEW |
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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 find = device_map_.find(sender); | 152 find = device_map_.find(sender); |
153 if (find != device_map_.end()) { | 153 if (find != device_map_.end()) { |
154 std::string device_id = find->second; | 154 std::string device_id = find->second; |
155 delegate->ToggleBluetoothConnection(device_id); | 155 delegate->ToggleBluetoothConnection(device_id); |
156 } | 156 } |
157 } | 157 } |
158 } | 158 } |
159 | 159 |
160 // Overridden from ButtonListener. | 160 // Overridden from ButtonListener. |
161 virtual void ButtonPressed(views::Button* sender, | 161 virtual void ButtonPressed(views::Button* sender, |
162 const views::Event& event) OVERRIDE { | 162 const ui::Event& event) OVERRIDE { |
163 ash::SystemTrayDelegate* delegate = | 163 ash::SystemTrayDelegate* delegate = |
164 ash::Shell::GetInstance()->tray_delegate(); | 164 ash::Shell::GetInstance()->tray_delegate(); |
165 if (sender == toggle_bluetooth_) | 165 if (sender == toggle_bluetooth_) |
166 delegate->ToggleBluetooth(); | 166 delegate->ToggleBluetooth(); |
167 else | 167 else |
168 NOTREACHED(); | 168 NOTREACHED(); |
169 } | 169 } |
170 | 170 |
171 user::LoginStatus login_; | 171 user::LoginStatus login_; |
172 | 172 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 BluetoothDeviceList list; | 224 BluetoothDeviceList list; |
225 Shell::GetInstance()->tray_delegate()->GetAvailableBluetoothDevices(&list); | 225 Shell::GetInstance()->tray_delegate()->GetAvailableBluetoothDevices(&list); |
226 if (default_) | 226 if (default_) |
227 default_->UpdateLabel(); | 227 default_->UpdateLabel(); |
228 else if (detailed_) | 228 else if (detailed_) |
229 detailed_->Update(list); | 229 detailed_->Update(list); |
230 } | 230 } |
231 | 231 |
232 } // namespace internal | 232 } // namespace internal |
233 } // namespace ash | 233 } // namespace ash |
OLD | NEW |