Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(372)

Side by Side Diff: chrome/browser/ui/webui/options2/chromeos/internet_options_handler2.cc

Issue 10073007: Add network settings to Wifi tab. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/options2/chromeos/internet_detail.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/ui/webui/options2/chromeos/internet_options_handler2.h" 5 #include "chrome/browser/ui/webui/options2/chromeos/internet_options_handler2.h"
6 6
7 #include <ctype.h> 7 #include <ctype.h>
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 { "disableDataRoaming", IDS_OPTIONS_SETTINGS_DISABLE_DATA_ROAMING }, 302 { "disableDataRoaming", IDS_OPTIONS_SETTINGS_DISABLE_DATA_ROAMING },
303 { "dataRoamingDisableToggleTooltip", 303 { "dataRoamingDisableToggleTooltip",
304 IDS_OPTIONS_SETTINGS_TOGGLE_DATA_ROAMING_RESTRICTION }, 304 IDS_OPTIONS_SETTINGS_TOGGLE_DATA_ROAMING_RESTRICTION },
305 { "activateNetwork", IDS_STATUSBAR_NETWORK_DEVICE_ACTIVATE }, 305 { "activateNetwork", IDS_STATUSBAR_NETWORK_DEVICE_ACTIVATE },
306 306
307 // Internet details dialog. 307 // Internet details dialog.
308 308
309 { "changeProxyButton", 309 { "changeProxyButton",
310 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_CHANGE_PROXY_BUTTON }, 310 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_CHANGE_PROXY_BUTTON },
311 { "managedNetwork", IDS_OPTIONS_SETTINGS_MANAGED_NETWORK }, 311 { "managedNetwork", IDS_OPTIONS_SETTINGS_MANAGED_NETWORK },
312 { "wifiNetworkTabLabel", IDS_OPTIONS_SETTINGS_INTERNET_TAB_WIFI }, 312 { "wifiNetworkTabLabel", IDS_OPTIONS_SETTINGS_INTERNET_TAB_CONNECTION },
313 { "vpnTabLabel", IDS_OPTIONS_SETTINGS_INTERNET_TAB_VPN }, 313 { "vpnTabLabel", IDS_OPTIONS_SETTINGS_INTERNET_TAB_VPN },
314 { "cellularPlanTabLabel", IDS_OPTIONS_SETTINGS_INTERNET_TAB_PLAN }, 314 { "cellularPlanTabLabel", IDS_OPTIONS_SETTINGS_INTERNET_TAB_PLAN },
315 { "cellularConnTabLabel", IDS_OPTIONS_SETTINGS_INTERNET_TAB_CONNECTION }, 315 { "cellularConnTabLabel", IDS_OPTIONS_SETTINGS_INTERNET_TAB_CONNECTION },
316 { "cellularDeviceTabLabel", IDS_OPTIONS_SETTINGS_INTERNET_TAB_DEVICE }, 316 { "cellularDeviceTabLabel", IDS_OPTIONS_SETTINGS_INTERNET_TAB_DEVICE },
317 { "networkTabLabel", IDS_OPTIONS_SETTINGS_INTERNET_TAB_NETWORK }, 317 { "networkTabLabel", IDS_OPTIONS_SETTINGS_INTERNET_TAB_NETWORK },
318 { "securityTabLabel", IDS_OPTIONS_SETTINGS_INTERNET_TAB_SECURITY }, 318 { "securityTabLabel", IDS_OPTIONS_SETTINGS_INTERNET_TAB_SECURITY },
319 { "proxyTabLabel", IDS_OPTIONS_SETTINGS_INTERNET_TAB_PROXY }, 319 { "proxyTabLabel", IDS_OPTIONS_SETTINGS_INTERNET_TAB_PROXY },
320 { "useDHCP", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_USE_DHCP }, 320 { "useDHCP", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_USE_DHCP },
321 { "useStaticIP", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_USE_STATIC_IP }, 321 { "useStaticIP", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_USE_STATIC_IP },
322 { "connectionState", IDS_OPTIONS_SETTINGS_INTERNET_CONNECTION_STATE }, 322 { "connectionState", IDS_OPTIONS_SETTINGS_INTERNET_CONNECTION_STATE },
323 { "inetAddress", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_ADDRESS }, 323 { "inetAddress", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_ADDRESS },
324 { "inetSubnetAddress", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_SUBNETMASK }, 324 { "inetSubnetAddress", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_SUBNETMASK },
325 { "inetGateway", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_GATEWAY }, 325 { "inetGateway", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_GATEWAY },
326 { "inetDns", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_DNSSERVER }, 326 { "inetDns", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_DNSSERVER },
327 { "hardwareAddress", 327 { "hardwareAddress",
328 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_HARDWARE_ADDRESS }, 328 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_HARDWARE_ADDRESS },
329 { "detailsInternetDismiss", IDS_CLOSE }, 329 { "detailsInternetDismiss", IDS_CLOSE },
330 { "activateButton", IDS_OPTIONS_SETTINGS_ACTIVATE }, 330 { "activateButton", IDS_OPTIONS_SETTINGS_ACTIVATE },
331 { "buyplanButton", IDS_OPTIONS_SETTINGS_BUY_PLAN }, 331 { "buyplanButton", IDS_OPTIONS_SETTINGS_BUY_PLAN },
332 { "connectButton", IDS_OPTIONS_SETTINGS_CONNECT }, 332 { "connectButton", IDS_OPTIONS_SETTINGS_CONNECT },
333 { "disconnectButton", IDS_OPTIONS_SETTINGS_DISCONNECT }, 333 { "disconnectButton", IDS_OPTIONS_SETTINGS_DISCONNECT },
334 { "viewAccountButton", IDS_STATUSBAR_NETWORK_VIEW_ACCOUNT }, 334 { "viewAccountButton", IDS_STATUSBAR_NETWORK_VIEW_ACCOUNT },
335 335
336 // Wifi Tab. 336 // Wifi Tab.
337 337
338 { "accessLockedMsg", IDS_STATUSBAR_NETWORK_LOCKED }, 338 { "accessLockedMsg", IDS_STATUSBAR_NETWORK_LOCKED },
339 { "inetSsid", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NETWORK_ID }, 339 { "inetSsid", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NETWORK_ID },
340 { "inetEncryption",
341 IDS_OPTIONS_SETTIGNS_INTERNET_OPTIONS_NETWORK_ENCRYPTION },
340 { "inetPassProtected", 342 { "inetPassProtected",
341 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NET_PROTECTED }, 343 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NET_PROTECTED },
342 { "inetNetworkShared", 344 { "inetNetworkShared",
343 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NETWORK_SHARED }, 345 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NETWORK_SHARED },
344 { "inetPreferredNetwork", 346 { "inetPreferredNetwork",
345 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_PREFER_NETWORK }, 347 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_PREFER_NETWORK },
346 { "inetAutoConnectNetwork", 348 { "inetAutoConnectNetwork",
347 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_AUTO_CONNECT }, 349 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_AUTO_CONNECT },
348 { "inetLogin", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_LOGIN }, 350 { "inetLogin", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_LOGIN },
349 { "inetShowPass", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_SHOWPASSWORD }, 351 { "inetShowPass", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_SHOWPASSWORD },
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 } 883 }
882 884
883 void InternetOptionsHandler::PopulateWifiDetails( 885 void InternetOptionsHandler::PopulateWifiDetails(
884 const chromeos::WifiNetwork* wifi, 886 const chromeos::WifiNetwork* wifi,
885 DictionaryValue* dictionary) { 887 DictionaryValue* dictionary) {
886 dictionary->SetString("ssid", wifi->name()); 888 dictionary->SetString("ssid", wifi->name());
887 bool remembered = (wifi->profile_type() != chromeos::PROFILE_NONE); 889 bool remembered = (wifi->profile_type() != chromeos::PROFILE_NONE);
888 dictionary->SetBoolean("remembered", remembered); 890 dictionary->SetBoolean("remembered", remembered);
889 bool shared = wifi->profile_type() == chromeos::PROFILE_SHARED; 891 bool shared = wifi->profile_type() == chromeos::PROFILE_SHARED;
890 dictionary->SetBoolean("shared", shared); 892 dictionary->SetBoolean("shared", shared);
893 dictionary->SetString("encryption", wifi->GetEncryptionString());
891 } 894 }
892 895
893 DictionaryValue* InternetOptionsHandler::CreateDictionaryFromCellularApn( 896 DictionaryValue* InternetOptionsHandler::CreateDictionaryFromCellularApn(
894 const chromeos::CellularApn& apn) { 897 const chromeos::CellularApn& apn) {
895 DictionaryValue* dictionary = new DictionaryValue(); 898 DictionaryValue* dictionary = new DictionaryValue();
896 dictionary->SetString("apn", apn.apn); 899 dictionary->SetString("apn", apn.apn);
897 dictionary->SetString("networkId", apn.network_id); 900 dictionary->SetString("networkId", apn.network_id);
898 dictionary->SetString("username", apn.username); 901 dictionary->SetString("username", apn.username);
899 dictionary->SetString("password", apn.password); 902 dictionary->SetString("password", apn.password);
900 dictionary->SetString("name", apn.name); 903 dictionary->SetString("name", apn.name);
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
1281 if (default_value) 1284 if (default_value)
1282 value_dict->Set("default", default_value->DeepCopy()); 1285 value_dict->Set("default", default_value->DeepCopy());
1283 if (ui_data.managed()) 1286 if (ui_data.managed())
1284 value_dict->SetString("controlledBy", "policy"); 1287 value_dict->SetString("controlledBy", "policy");
1285 else if (ui_data.recommended()) 1288 else if (ui_data.recommended())
1286 value_dict->SetString("controlledBy", "recommended"); 1289 value_dict->SetString("controlledBy", "recommended");
1287 settings->Set(key, value_dict); 1290 settings->Set(key, value_dict);
1288 } 1291 }
1289 1292
1290 } // namespace options2 1293 } // namespace options2
OLDNEW
« no previous file with comments | « chrome/browser/resources/options2/chromeos/internet_detail.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698