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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 detailed_(NULL) { | 218 detailed_(NULL) { |
219 } | 219 } |
220 | 220 |
221 TrayBluetooth::~TrayBluetooth() { | 221 TrayBluetooth::~TrayBluetooth() { |
222 } | 222 } |
223 | 223 |
224 views::View* TrayBluetooth::CreateTrayView(user::LoginStatus status) { | 224 views::View* TrayBluetooth::CreateTrayView(user::LoginStatus status) { |
225 return NULL; | 225 return NULL; |
226 } | 226 } |
227 | 227 |
228 views::View* TrayBluetooth::CreateDefaultView(user::LoginStatus status) { | 228 views::View* TrayBluetooth::CreateDefaultView(user::LoginStatus status, |
| 229 int bubble_width) { |
229 CHECK(default_ == NULL); | 230 CHECK(default_ == NULL); |
230 default_ = new tray::BluetoothDefaultView(this); | 231 default_ = new tray::BluetoothDefaultView(this); |
231 return default_; | 232 return default_; |
232 } | 233 } |
233 | 234 |
234 views::View* TrayBluetooth::CreateDetailedView(user::LoginStatus status) { | 235 views::View* TrayBluetooth::CreateDetailedView(user::LoginStatus status) { |
235 if (!Shell::GetInstance()->tray_delegate()->GetBluetoothAvailable()) | 236 if (!Shell::GetInstance()->tray_delegate()->GetBluetoothAvailable()) |
236 return NULL; | 237 return NULL; |
237 CHECK(detailed_ == NULL); | 238 CHECK(detailed_ == NULL); |
238 detailed_ = new tray::BluetoothDetailedView(status); | 239 detailed_ = new tray::BluetoothDetailedView(status); |
(...skipping 26 matching lines...) Expand all Loading... |
265 void TrayBluetooth::OnBluetoothDiscoveringChanged() { | 266 void TrayBluetooth::OnBluetoothDiscoveringChanged() { |
266 if (!detailed_) | 267 if (!detailed_) |
267 return; | 268 return; |
268 BluetoothDeviceList list; | 269 BluetoothDeviceList list; |
269 Shell::GetInstance()->tray_delegate()->GetAvailableBluetoothDevices(&list); | 270 Shell::GetInstance()->tray_delegate()->GetAvailableBluetoothDevices(&list); |
270 detailed_->Update(list); | 271 detailed_->Update(list); |
271 } | 272 } |
272 | 273 |
273 } // namespace internal | 274 } // namespace internal |
274 } // namespace ash | 275 } // namespace ash |
OLD | NEW |