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 "chrome/browser/chromeos/system/ash_system_tray_delegate.h" | 5 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
778 DCHECK(!CommandLine::ForCurrentProcess()->HasSwitch( | 778 DCHECK(!CommandLine::ForCurrentProcess()->HasSwitch( |
779 chromeos::switches::kUseNewNetworkConnectionHandler)); | 779 chromeos::switches::kUseNewNetworkConnectionHandler)); |
780 network_connect::ConnectResult result = | 780 network_connect::ConnectResult result = |
781 network_connect::ConnectToNetwork(network_id, GetNativeWindow()); | 781 network_connect::ConnectToNetwork(network_id, GetNativeWindow()); |
782 if (result == network_connect::NETWORK_NOT_FOUND) | 782 if (result == network_connect::NETWORK_NOT_FOUND) |
783 ShowNetworkSettings(""); | 783 ShowNetworkSettings(""); |
784 else if (result == network_connect::CONNECT_NOT_STARTED) | 784 else if (result == network_connect::CONNECT_NOT_STARTED) |
785 ShowNetworkSettings(network_id); | 785 ShowNetworkSettings(network_id); |
786 } | 786 } |
787 | 787 |
788 virtual void AddBluetoothDevice() OVERRIDE { | 788 virtual void ManageBluetoothDevices() OVERRIDE { |
789 // Open the Bluetooth device dialog, which automatically starts the | |
790 // discovery process. | |
791 content::RecordAction( | 789 content::RecordAction( |
792 content::UserMetricsAction("OpenAddBluetoothDeviceDialog")); | 790 content::UserMetricsAction("ShowBluetoothSettingsPage")); |
793 chrome::ShowSettingsSubPage(GetAppropriateBrowser(), | 791 std::string sub_page = std::string(chrome::kSearchSubPage) + "#" + |
794 chrome::kBluetoothAddDeviceSubPage); | 792 l10n_util::GetStringUTF8(IDS_OPTIONS_SETTINGS_SECTION_TITLE_BLUETOOTH); |
| 793 chrome::ShowSettingsSubPage(GetAppropriateBrowser(), sub_page); |
795 } | 794 } |
796 | 795 |
797 virtual void ToggleBluetooth() OVERRIDE { | 796 virtual void ToggleBluetooth() OVERRIDE { |
798 bluetooth_adapter_->SetPowered(!bluetooth_adapter_->IsPowered(), | 797 bluetooth_adapter_->SetPowered(!bluetooth_adapter_->IsPowered(), |
799 base::Bind(&base::DoNothing), | 798 base::Bind(&base::DoNothing), |
800 base::Bind(&BluetoothPowerFailure)); | 799 base::Bind(&BluetoothPowerFailure)); |
801 } | 800 } |
802 | 801 |
803 virtual void ShowMobileSimDialog() OVERRIDE { | 802 virtual void ShowMobileSimDialog() OVERRIDE { |
804 SimDialogDelegate::ShowDialog(GetNativeWindow(), | 803 SimDialogDelegate::ShowDialog(GetNativeWindow(), |
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1360 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); | 1359 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); |
1361 }; | 1360 }; |
1362 | 1361 |
1363 } // namespace | 1362 } // namespace |
1364 | 1363 |
1365 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1364 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
1366 return new chromeos::SystemTrayDelegate(); | 1365 return new chromeos::SystemTrayDelegate(); |
1367 } | 1366 } |
1368 | 1367 |
1369 } // namespace chromeos | 1368 } // namespace chromeos |
OLD | NEW |