diff options
author | armansito@chromium.org <armansito@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-01 00:37:06 +0000 |
---|---|---|
committer | armansito@chromium.org <armansito@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-01 00:37:06 +0000 |
commit | 1d8e61772ad9012127510f968af0f7fad8bc1595 (patch) | |
tree | 3883c6f1c8780d91da3affe2263ee19fadf7580a /ash/system/tray | |
parent | 64832fa1aab8a1ac95aebf0d1058fcbe3e66c08d (diff) | |
download | chromium_src-1d8e61772ad9012127510f968af0f7fad8bc1595.zip chromium_src-1d8e61772ad9012127510f968af0f7fad8bc1595.tar.gz chromium_src-1d8e61772ad9012127510f968af0f7fad8bc1595.tar.bz2 |
ash::internal::TrayBluetooth: Hide spinner if discovery session stops.
Changed TrayBluetooth to update the spinner not based on whether or not it
requested discovery but whether or not system tray delegate has an active
discovery session. The code will now automatically try to restart discovery
if discovery stops unexpectedly and start or stop the throbber based on that.
Also renamed UpdateBlueToothDeviceList to UpdateBluetoothDeviceList and
UpdateBluetoothDeviceList to UpdateBluetoothDeviceListHelper.
BUG=345494
TEST=1. Hack bluetoothd to allow stopping discovery via command-line regardless
of the client who intiated it. Use bluetoothctl and run 'scan off' after running
discovery via TrayBluetooth. The spinner should visibly update and discovery
should restart (upon which the spinner should re-update).
2. Start discovery outside of TrayBluetooth (e.g chrome://settings). Opening the
tray discovery dialog should work as expected (i.e. the spinner should animate
and found devices list should be populated.
Review URL: https://codereview.chromium.org/216293007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260718 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/system/tray')
-rw-r--r-- | ash/system/tray/default_system_tray_delegate.cc | 4 | ||||
-rw-r--r-- | ash/system/tray/default_system_tray_delegate.h | 1 | ||||
-rw-r--r-- | ash/system/tray/system_tray_delegate.h | 3 |
3 files changed, 8 insertions, 0 deletions
diff --git a/ash/system/tray/default_system_tray_delegate.cc b/ash/system/tray/default_system_tray_delegate.cc index 46c4c3d..694b66b 100644 --- a/ash/system/tray/default_system_tray_delegate.cc +++ b/ash/system/tray/default_system_tray_delegate.cc @@ -253,6 +253,10 @@ bool DefaultSystemTrayDelegate::GetBluetoothEnabled() { return bluetooth_enabled_; } +bool DefaultSystemTrayDelegate::GetBluetoothDiscovering() { + return false; +} + void DefaultSystemTrayDelegate::ChangeProxySettings() { } diff --git a/ash/system/tray/default_system_tray_delegate.h b/ash/system/tray/default_system_tray_delegate.h index 5499ee4..0f47d16 100644 --- a/ash/system/tray/default_system_tray_delegate.h +++ b/ash/system/tray/default_system_tray_delegate.h @@ -80,6 +80,7 @@ class ASH_EXPORT DefaultSystemTrayDelegate : public SystemTrayDelegate { virtual void ShowOtherNetworkDialog(const std::string& type) OVERRIDE; virtual bool GetBluetoothAvailable() OVERRIDE; virtual bool GetBluetoothEnabled() OVERRIDE; + virtual bool GetBluetoothDiscovering() OVERRIDE; virtual void ChangeProxySettings() OVERRIDE; virtual VolumeControlDelegate* GetVolumeControlDelegate() const OVERRIDE; virtual void SetVolumeControlDelegate( diff --git a/ash/system/tray/system_tray_delegate.h b/ash/system/tray/system_tray_delegate.h index 67d1f8c..fe0863b 100644 --- a/ash/system/tray/system_tray_delegate.h +++ b/ash/system/tray/system_tray_delegate.h @@ -300,6 +300,9 @@ class ASH_EXPORT SystemTrayDelegate { // Returns whether bluetooth is enabled. virtual bool GetBluetoothEnabled() = 0; + // Returns whether the delegate has initiated a bluetooth discovery session. + virtual bool GetBluetoothDiscovering() = 0; + // Shows UI for changing proxy settings. virtual void ChangeProxySettings() = 0; |