| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 #include "chromeos/dbus/power_manager_client.h" | 92 #include "chromeos/dbus/power_manager_client.h" |
| 93 #include "chromeos/dbus/session_manager_client.h" | 93 #include "chromeos/dbus/session_manager_client.h" |
| 94 #include "chromeos/dbus/system_clock_client.h" | 94 #include "chromeos/dbus/system_clock_client.h" |
| 95 #include "chromeos/ime/extension_ime_util.h" | 95 #include "chromeos/ime/extension_ime_util.h" |
| 96 #include "chromeos/ime/input_method_manager.h" | 96 #include "chromeos/ime/input_method_manager.h" |
| 97 #include "chromeos/ime/xkeyboard.h" | 97 #include "chromeos/ime/xkeyboard.h" |
| 98 #include "chromeos/login/login_state.h" | 98 #include "chromeos/login/login_state.h" |
| 99 #include "chromeos/network/network_event_log.h" | 99 #include "chromeos/network/network_event_log.h" |
| 100 #include "chromeos/network/network_state.h" | 100 #include "chromeos/network/network_state.h" |
| 101 #include "chromeos/network/network_state_handler.h" | 101 #include "chromeos/network/network_state_handler.h" |
| 102 #include "chromeos/network/shill_property_util.h" |
| 102 #include "content/public/browser/browser_thread.h" | 103 #include "content/public/browser/browser_thread.h" |
| 103 #include "content/public/browser/notification_observer.h" | 104 #include "content/public/browser/notification_observer.h" |
| 104 #include "content/public/browser/notification_service.h" | 105 #include "content/public/browser/notification_service.h" |
| 105 #include "content/public/browser/user_metrics.h" | 106 #include "content/public/browser/user_metrics.h" |
| 106 #include "content/public/browser/web_contents.h" | 107 #include "content/public/browser/web_contents.h" |
| 107 #include "device/bluetooth/bluetooth_adapter.h" | 108 #include "device/bluetooth/bluetooth_adapter.h" |
| 108 #include "device/bluetooth/bluetooth_adapter_factory.h" | 109 #include "device/bluetooth/bluetooth_adapter_factory.h" |
| 109 #include "device/bluetooth/bluetooth_device.h" | 110 #include "device/bluetooth/bluetooth_device.h" |
| 110 #include "grit/ash_strings.h" | 111 #include "grit/ash_strings.h" |
| 111 #include "grit/generated_resources.h" | 112 #include "grit/generated_resources.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 // TODO(sad): Do something? | 222 // TODO(sad): Do something? |
| 222 } | 223 } |
| 223 | 224 |
| 224 void ShowNetworkSettingsPage(const std::string& service_path) { | 225 void ShowNetworkSettingsPage(const std::string& service_path) { |
| 225 std::string page = chrome::kInternetOptionsSubPage; | 226 std::string page = chrome::kInternetOptionsSubPage; |
| 226 const NetworkState* network = service_path.empty() ? NULL : | 227 const NetworkState* network = service_path.empty() ? NULL : |
| 227 NetworkHandler::Get()->network_state_handler()->GetNetworkState( | 228 NetworkHandler::Get()->network_state_handler()->GetNetworkState( |
| 228 service_path); | 229 service_path); |
| 229 if (network) { | 230 if (network) { |
| 230 std::string name(network->name()); | 231 std::string name(network->name()); |
| 231 if (name.empty() && network->type() == flimflam::kTypeEthernet) | 232 if (name.empty() && network->Matches(NetworkTypePattern::Ethernet())) |
| 232 name = l10n_util::GetStringUTF8(IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET); | 233 name = l10n_util::GetStringUTF8(IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET); |
| 233 page += base::StringPrintf( | 234 page += base::StringPrintf( |
| 234 "?servicePath=%s&networkType=%s&networkName=%s", | 235 "?servicePath=%s&networkType=%s&networkName=%s", |
| 235 net::EscapeUrlEncodedData(service_path, true).c_str(), | 236 net::EscapeUrlEncodedData(service_path, true).c_str(), |
| 236 net::EscapeUrlEncodedData(network->type(), true).c_str(), | 237 net::EscapeUrlEncodedData(network->type(), true).c_str(), |
| 237 net::EscapeUrlEncodedData(name, false).c_str()); | 238 net::EscapeUrlEncodedData(name, false).c_str()); |
| 238 } | 239 } |
| 239 content::RecordAction( | 240 content::RecordAction( |
| 240 content::UserMetricsAction("OpenInternetOptionsDialog")); | 241 content::UserMetricsAction("OpenInternetOptionsDialog")); |
| 241 Browser* browser = chrome::FindOrCreateTabbedBrowser( | 242 Browser* browser = chrome::FindOrCreateTabbedBrowser( |
| (...skipping 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1337 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); | 1338 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); |
| 1338 }; | 1339 }; |
| 1339 | 1340 |
| 1340 } // namespace | 1341 } // namespace |
| 1341 | 1342 |
| 1342 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1343 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
| 1343 return new chromeos::SystemTrayDelegate(); | 1344 return new chromeos::SystemTrayDelegate(); |
| 1344 } | 1345 } |
| 1345 | 1346 |
| 1346 } // namespace chromeos | 1347 } // namespace chromeos |
| OLD | NEW |