summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjennyz@chromium.org <jennyz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-24 00:27:31 +0000
committerjennyz@chromium.org <jennyz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-24 00:27:31 +0000
commitdfd41778d45ceb852a5ee1b99411d4673a67bca3 (patch)
tree85d91a49d3f2509ead851e1676471d4ede1911de
parent8afbd0fe7f4732d8484a2a41b91451ec220fc2f8 (diff)
downloadchromium_src-dfd41778d45ceb852a5ee1b99411d4673a67bca3.zip
chromium_src-dfd41778d45ceb852a5ee1b99411d4673a67bca3.tar.gz
chromium_src-dfd41778d45ceb852a5ee1b99411d4673a67bca3.tar.bz2
Change "Add Device" button to "Manage Devices" on ash tray bluetooth page.
BUG=175796 TBR=jamescook Review URL: https://chromiumcodereview.appspot.com/19744003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213292 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ash/ash_strings.grd4
-rw-r--r--ash/system/bluetooth/tray_bluetooth.cc14
-rw-r--r--ash/system/tray/system_tray_delegate.h4
-rw-r--r--ash/system/tray/test_system_tray_delegate.cc2
-rw-r--r--ash/system/tray/test_system_tray_delegate.h2
-rw-r--r--chrome/browser/chromeos/system/ash_system_tray_delegate.cc11
-rw-r--r--tools/metrics/actions/chromeactions.txt3
7 files changed, 19 insertions, 21 deletions
diff --git a/ash/ash_strings.grd b/ash/ash_strings.grd
index eaa14f3..7da4c8c 100644
--- a/ash/ash_strings.grd
+++ b/ash/ash_strings.grd
@@ -279,8 +279,8 @@ Press Ctrl+Alt+Z to disable.
<message name="IDS_ASH_STATUS_TRAY_ENABLE_BLUETOOTH" desc="The label used in the tray popup to enable bluetooth.">
Enable Bluetooth
</message>
- <message name="IDS_ASH_STATUS_TRAY_BLUETOOTH_ADD_DEVICE" desc="The label used in the tray popup to add a bluetooth device.">
- Add device...
+ <message name="IDS_ASH_STATUS_TRAY_BLUETOOTH_MANAGE_DEVICES" desc="The label used in the tray popup to manage bluetooth devices.">
+ Manage devices...
</message>
<message name="IDS_ASH_STATUS_TRAY_BLUETOOTH_DISCOVERING" desc="The label used in the tray popup to show bluetooth is discovering devices.">
Scanning for devices...
diff --git a/ash/system/bluetooth/tray_bluetooth.cc b/ash/system/bluetooth/tray_bluetooth.cc
index b3a398a..95af770 100644
--- a/ash/system/bluetooth/tray_bluetooth.cc
+++ b/ash/system/bluetooth/tray_bluetooth.cc
@@ -103,7 +103,7 @@ class BluetoothDetailedView : public TrayDetailsView,
BluetoothDetailedView(SystemTrayItem* owner, user::LoginStatus login)
: TrayDetailsView(owner),
login_(login),
- add_device_(NULL),
+ manage_devices_(NULL),
toggle_bluetooth_(NULL),
enable_bluetooth_(NULL),
bluetooth_discovering_(false) {
@@ -308,11 +308,11 @@ class BluetoothDetailedView : public TrayDetailsView,
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
HoverHighlightView* container = new HoverHighlightView(this);
container->AddLabel(
- rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_BLUETOOTH_ADD_DEVICE),
+ rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_BLUETOOTH_MANAGE_DEVICES),
gfx::Font::NORMAL);
container->SetEnabled(delegate->GetBluetoothAvailable());
AddChildView(container);
- add_device_ = container;
+ manage_devices_ = container;
}
// Returns true if the device with |device_id| is found in |device_list|,
@@ -354,10 +354,8 @@ class BluetoothDetailedView : public TrayDetailsView,
ash::Shell::GetInstance()->system_tray_delegate();
if (sender == footer()->content()) {
owner()->system_tray()->ShowDefaultView(BUBBLE_USE_EXISTING);
- } else if (sender == add_device_) {
- if (!delegate->GetBluetoothEnabled())
- delegate->ToggleBluetooth();
- delegate->AddBluetoothDevice();
+ } else if (sender == manage_devices_) {
+ delegate->ManageBluetoothDevices();
} else if (sender == enable_bluetooth_) {
delegate->ToggleBluetooth();
} else {
@@ -389,7 +387,7 @@ class BluetoothDetailedView : public TrayDetailsView,
user::LoginStatus login_;
std::map<views::View*, std::string> device_map_;
- views::View* add_device_;
+ views::View* manage_devices_;
ThrobberView* throbber_;
TrayPopupHeaderButton* toggle_bluetooth_;
HoverHighlightView* enable_bluetooth_;
diff --git a/ash/system/tray/system_tray_delegate.h b/ash/system/tray/system_tray_delegate.h
index ee60831..45b0c71 100644
--- a/ash/system/tray/system_tray_delegate.h
+++ b/ash/system/tray/system_tray_delegate.h
@@ -253,8 +253,8 @@ class SystemTrayDelegate {
// Sends a connect request for the network specified by |network_id|.
virtual void ConnectToNetwork(const std::string& network_id) = 0;
- // Shows UI to add a new bluetooth device.
- virtual void AddBluetoothDevice() = 0;
+ // Shows UI to manage bluetooth devices.
+ virtual void ManageBluetoothDevices() = 0;
// Toggles bluetooth.
virtual void ToggleBluetooth() = 0;
diff --git a/ash/system/tray/test_system_tray_delegate.cc b/ash/system/tray/test_system_tray_delegate.cc
index 7038cc3..38a7bcb1 100644
--- a/ash/system/tray/test_system_tray_delegate.cc
+++ b/ash/system/tray/test_system_tray_delegate.cc
@@ -227,7 +227,7 @@ void TestSystemTrayDelegate::ConfigureNetwork(const std::string& network_id) {
void TestSystemTrayDelegate::ConnectToNetwork(const std::string& network_id) {
}
-void TestSystemTrayDelegate::AddBluetoothDevice() {
+void TestSystemTrayDelegate::ManageBluetoothDevices() {
}
void TestSystemTrayDelegate::ToggleBluetooth() {
diff --git a/ash/system/tray/test_system_tray_delegate.h b/ash/system/tray/test_system_tray_delegate.h
index 56cb078..26a3dc7 100644
--- a/ash/system/tray/test_system_tray_delegate.h
+++ b/ash/system/tray/test_system_tray_delegate.h
@@ -70,7 +70,7 @@ class TestSystemTrayDelegate : public SystemTrayDelegate {
ash::DriveOperationStatusList*) OVERRIDE;
virtual void ConfigureNetwork(const std::string& network_id) OVERRIDE;
virtual void ConnectToNetwork(const std::string& network_id) OVERRIDE;
- virtual void AddBluetoothDevice() OVERRIDE;
+ virtual void ManageBluetoothDevices() OVERRIDE;
virtual void ToggleBluetooth() OVERRIDE;
virtual bool IsBluetoothDiscovering() OVERRIDE;
virtual void ShowMobileSimDialog() OVERRIDE;
diff --git a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
index 8c2fdb4..a7f7ed9 100644
--- a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
+++ b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
@@ -785,13 +785,12 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate,
ShowNetworkSettings(network_id);
}
- virtual void AddBluetoothDevice() OVERRIDE {
- // Open the Bluetooth device dialog, which automatically starts the
- // discovery process.
+ virtual void ManageBluetoothDevices() OVERRIDE {
content::RecordAction(
- content::UserMetricsAction("OpenAddBluetoothDeviceDialog"));
- chrome::ShowSettingsSubPage(GetAppropriateBrowser(),
- chrome::kBluetoothAddDeviceSubPage);
+ content::UserMetricsAction("ShowBluetoothSettingsPage"));
+ std::string sub_page = std::string(chrome::kSearchSubPage) + "#" +
+ l10n_util::GetStringUTF8(IDS_OPTIONS_SETTINGS_SECTION_TITLE_BLUETOOTH);
+ chrome::ShowSettingsSubPage(GetAppropriateBrowser(), sub_page);
}
virtual void ToggleBluetooth() OVERRIDE {
diff --git a/tools/metrics/actions/chromeactions.txt b/tools/metrics/actions/chromeactions.txt
index 83447cd..f8c62b7 100644
--- a/tools/metrics/actions/chromeactions.txt
+++ b/tools/metrics/actions/chromeactions.txt
@@ -1189,7 +1189,7 @@
0xbdc9ec125e7a3ade NewWindow
0xa86d43452b05bf72 Notifications.ShowMessageCenter
0xa72c673a1f44d11f OmniboxDestinationURLIsSearchOnDSP
-0xa04047593128ff2a OmniboxDestinationURLMatchesDefaultSearchProvider
+0x6048dbd4f2f2ca50 OmniboxDestinationURLMatchesDefaultSearchProvider
0x268376698078c71b OmniboxInputInProgress
0xe7ff15c3f1043a26 Omnibox_DragString
0x1a18c36c737ec22b Omnibox_DragURL
@@ -1505,6 +1505,7 @@
0x0d1d6961dd313b79 ShowAppMenu
0x9be2b265107318b8 ShowApplications
0x853927a304493ac7 ShowAsTab
+0x2c5584a8586dc1ab ShowBluetoothSettingsPage
0x1b93c35c19ff3600 ShowBookmarkManager
0xd1a227df4f361dbb ShowBookmarks
0x1afb02b1f90b177e ShowBookmarksBar