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