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

Unified Diff: chrome/browser/ui/ash/system_tray_delegate_chromeos.cc

Issue 216293007: ash::internal::TrayBluetooth: Hide spinner if discovery session stops. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
diff --git a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
index d3fc1aa252dc5d45f6f695694bc45e7bebb0a04f..aeb2ad8f95f126a71327b90302d33af1c06592f6 100644
--- a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
@@ -697,8 +697,7 @@ void SystemTrayDelegateChromeOS::GetAvailableBluetoothDevices(
}
void SystemTrayDelegateChromeOS::BluetoothStartDiscovering() {
- if (bluetooth_discovery_session_.get() &&
- bluetooth_discovery_session_->IsActive()) {
+ if (GetBluetoothDiscovering()) {
LOG(WARNING) << "Already have active Bluetooth device discovery session.";
return;
}
@@ -712,8 +711,7 @@ void SystemTrayDelegateChromeOS::BluetoothStartDiscovering() {
void SystemTrayDelegateChromeOS::BluetoothStopDiscovering() {
should_run_bluetooth_discovery_ = false;
- if (!bluetooth_discovery_session_.get() ||
- !bluetooth_discovery_session_->IsActive()) {
+ if (!GetBluetoothDiscovering()) {
LOG(WARNING) << "No active Bluetooth device discovery session.";
return;
}
@@ -869,6 +867,11 @@ bool SystemTrayDelegateChromeOS::GetBluetoothEnabled() {
return bluetooth_adapter_->IsPowered();
}
+bool SystemTrayDelegateChromeOS::GetBluetoothDiscovering() {
+ return (bluetooth_discovery_session_.get() &&
+ bluetooth_discovery_session_->IsActive());
+}
+
void SystemTrayDelegateChromeOS::ChangeProxySettings() {
CHECK(GetUserLoginStatus() == ash::user::LOGGED_IN_NONE);
LoginDisplayHostImpl::default_host()->OpenProxySettings();
@@ -1348,6 +1351,7 @@ void SystemTrayDelegateChromeOS::OnStartBluetoothDiscoverySession(
return;
VLOG(1) << "Claiming new Bluetooth device discovery session.";
bluetooth_discovery_session_ = discovery_session.Pass();
+ GetSystemTrayNotifier()->NotifyBluetoothDiscoveringChanged();
}
void SystemTrayDelegateChromeOS::UpdateEnterpriseDomain() {
« no previous file with comments | « chrome/browser/ui/ash/system_tray_delegate_chromeos.h ('k') | chrome/browser/ui/ash/system_tray_delegate_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698