| 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/common/system/chromeos/bluetooth/tray_bluetooth.h" | 5 #include "ash/common/system/chromeos/bluetooth/tray_bluetooth.h" |
| 6 | 6 |
| 7 #include "ash/common/session/session_state_delegate.h" | 7 #include "ash/common/session/session_state_delegate.h" |
| 8 #include "ash/common/system/chromeos/bluetooth/tray_bluetooth_helper.h" | 8 #include "ash/common/system/chromeos/bluetooth/tray_bluetooth_helper.h" |
| 9 #include "ash/common/system/tray/hover_highlight_view.h" | 9 #include "ash/common/system/tray/hover_highlight_view.h" |
| 10 #include "ash/common/system/tray/system_tray.h" | 10 #include "ash/common/system/tray/system_tray.h" |
| (...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 590 | 590 |
| 591 DISALLOW_COPY_AND_ASSIGN(BluetoothDetailedView); | 591 DISALLOW_COPY_AND_ASSIGN(BluetoothDetailedView); |
| 592 }; | 592 }; |
| 593 | 593 |
| 594 } // namespace tray | 594 } // namespace tray |
| 595 | 595 |
| 596 TrayBluetooth::TrayBluetooth(SystemTray* system_tray) | 596 TrayBluetooth::TrayBluetooth(SystemTray* system_tray) |
| 597 : SystemTrayItem(system_tray, UMA_BLUETOOTH), | 597 : SystemTrayItem(system_tray, UMA_BLUETOOTH), |
| 598 default_(nullptr), | 598 default_(nullptr), |
| 599 detailed_(nullptr) { | 599 detailed_(nullptr) { |
| 600 WmShell::Get()->system_tray_notifier()->AddBluetoothObserver(this); | 600 Shell::Get()->system_tray_notifier()->AddBluetoothObserver(this); |
| 601 } | 601 } |
| 602 | 602 |
| 603 TrayBluetooth::~TrayBluetooth() { | 603 TrayBluetooth::~TrayBluetooth() { |
| 604 WmShell::Get()->system_tray_notifier()->RemoveBluetoothObserver(this); | 604 Shell::Get()->system_tray_notifier()->RemoveBluetoothObserver(this); |
| 605 } | 605 } |
| 606 | 606 |
| 607 views::View* TrayBluetooth::CreateTrayView(LoginStatus status) { | 607 views::View* TrayBluetooth::CreateTrayView(LoginStatus status) { |
| 608 return NULL; | 608 return NULL; |
| 609 } | 609 } |
| 610 | 610 |
| 611 views::View* TrayBluetooth::CreateDefaultView(LoginStatus status) { | 611 views::View* TrayBluetooth::CreateDefaultView(LoginStatus status) { |
| 612 CHECK(default_ == NULL); | 612 CHECK(default_ == NULL); |
| 613 default_ = new tray::BluetoothDefaultView(this); | 613 default_ = new tray::BluetoothDefaultView(this); |
| 614 default_->SetEnabled(status != LoginStatus::LOCKED); | 614 default_->SetEnabled(status != LoginStatus::LOCKED); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 detailed_->Update(); | 646 detailed_->Update(); |
| 647 } | 647 } |
| 648 | 648 |
| 649 void TrayBluetooth::OnBluetoothDiscoveringChanged() { | 649 void TrayBluetooth::OnBluetoothDiscoveringChanged() { |
| 650 if (!detailed_) | 650 if (!detailed_) |
| 651 return; | 651 return; |
| 652 detailed_->Update(); | 652 detailed_->Update(); |
| 653 } | 653 } |
| 654 | 654 |
| 655 } // namespace ash | 655 } // namespace ash |
| OLD | NEW |