| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/ui/ash/system_tray_delegate_chromeos.h" | 5 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 void BluetoothSetDiscoveringError() { | 213 void BluetoothSetDiscoveringError() { |
| 214 LOG(ERROR) << "BluetoothSetDiscovering failed."; | 214 LOG(ERROR) << "BluetoothSetDiscovering failed."; |
| 215 } | 215 } |
| 216 | 216 |
| 217 void BluetoothDeviceConnectError( | 217 void BluetoothDeviceConnectError( |
| 218 device::BluetoothDevice::ConnectErrorCode error_code) { | 218 device::BluetoothDevice::ConnectErrorCode error_code) { |
| 219 // TODO(sad): Do something? | 219 // TODO(sad): Do something? |
| 220 } | 220 } |
| 221 | 221 |
| 222 void ShowSettingsSubPageForActiveUser(const std::string& sub_page) { | 222 void ShowSettingsSubPageForActiveUser(const std::string& sub_page) { |
| 223 ash::Shell::GetInstance() |
| 224 ->session_state_delegate() |
| 225 ->HideMultipleSigninScreen(); |
| 226 |
| 223 chrome::ShowSettingsSubPageForProfile( | 227 chrome::ShowSettingsSubPageForProfile( |
| 224 ProfileManager::GetActiveUserProfile(), sub_page); | 228 ProfileManager::GetActiveUserProfile(), sub_page); |
| 225 } | 229 } |
| 226 | 230 |
| 227 void ShowNetworkSettingsPage(const std::string& service_path) { | 231 void ShowNetworkSettingsPage(const std::string& service_path) { |
| 228 std::string page = chrome::kInternetOptionsSubPage; | 232 std::string page = chrome::kInternetOptionsSubPage; |
| 229 page += "?servicePath=" + net::EscapeUrlEncodedData(service_path, true); | 233 page += "?servicePath=" + net::EscapeUrlEncodedData(service_path, true); |
| 230 content::RecordAction(base::UserMetricsAction("OpenInternetOptionsDialog")); | 234 content::RecordAction(base::UserMetricsAction("OpenInternetOptionsDialog")); |
| 231 ShowSettingsSubPageForActiveUser(page); | 235 ShowSettingsSubPageForActiveUser(page); |
| 232 } | 236 } |
| (...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 836 SimDialogDelegate::SIM_DIALOG_UNLOCK); | 840 SimDialogDelegate::SIM_DIALOG_UNLOCK); |
| 837 } | 841 } |
| 838 | 842 |
| 839 void SystemTrayDelegateChromeOS::ShowMobileSetupDialog( | 843 void SystemTrayDelegateChromeOS::ShowMobileSetupDialog( |
| 840 const std::string& service_path) { | 844 const std::string& service_path) { |
| 841 MobileSetupDialog::Show(service_path); | 845 MobileSetupDialog::Show(service_path); |
| 842 } | 846 } |
| 843 | 847 |
| 844 void SystemTrayDelegateChromeOS::ShowOtherNetworkDialog( | 848 void SystemTrayDelegateChromeOS::ShowOtherNetworkDialog( |
| 845 const std::string& type) { | 849 const std::string& type) { |
| 850 ash::Shell::GetInstance() |
| 851 ->session_state_delegate() |
| 852 ->HideMultipleSigninScreen(); |
| 853 |
| 846 if (type == shill::kTypeCellular) { | 854 if (type == shill::kTypeCellular) { |
| 847 ChooseMobileNetworkDialog::ShowDialog(GetNativeWindow()); | 855 ChooseMobileNetworkDialog::ShowDialog(GetNativeWindow()); |
| 848 return; | 856 return; |
| 849 } | 857 } |
| 850 NetworkConfigView::ShowForType(type, GetNativeWindow()); | 858 NetworkConfigView::ShowForType(type, GetNativeWindow()); |
| 851 } | 859 } |
| 852 | 860 |
| 853 bool SystemTrayDelegateChromeOS::GetBluetoothAvailable() { | 861 bool SystemTrayDelegateChromeOS::GetBluetoothAvailable() { |
| 854 return bluetooth_adapter_->IsPresent(); | 862 return bluetooth_adapter_->IsPresent(); |
| 855 } | 863 } |
| (...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1403 accessibility_subscription_.reset(); | 1411 accessibility_subscription_.reset(); |
| 1404 else | 1412 else |
| 1405 OnAccessibilityModeChanged(details.notify); | 1413 OnAccessibilityModeChanged(details.notify); |
| 1406 } | 1414 } |
| 1407 | 1415 |
| 1408 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1416 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
| 1409 return new SystemTrayDelegateChromeOS(); | 1417 return new SystemTrayDelegateChromeOS(); |
| 1410 } | 1418 } |
| 1411 | 1419 |
| 1412 } // namespace chromeos | 1420 } // namespace chromeos |
| OLD | NEW |