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

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

Issue 9442027: Add header to network details dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix typos. Created 8 years, 10 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
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 916 matching lines...) Expand 10 before | Expand all | Expand 10 after
927 SetValueDictionary(&dictionary, "ipconfigStatic", ipconfig_static.release(), 927 SetValueDictionary(&dictionary, "ipconfigStatic", ipconfig_static.release(),
928 ipconfig_static_ui_data); 928 ipconfig_static_ui_data);
929 929
930 chromeos::ConnectionType type = network->type(); 930 chromeos::ConnectionType type = network->type();
931 dictionary.SetInteger("type", type); 931 dictionary.SetInteger("type", type);
932 dictionary.SetString("servicePath", network->service_path()); 932 dictionary.SetString("servicePath", network->service_path());
933 dictionary.SetBoolean("connecting", network->connecting()); 933 dictionary.SetBoolean("connecting", network->connecting());
934 dictionary.SetBoolean("connected", network->connected()); 934 dictionary.SetBoolean("connected", network->connected());
935 dictionary.SetString("connectionState", network->GetStateString()); 935 dictionary.SetString("connectionState", network->GetStateString());
936 936
937 const SkBitmap& iconBitmap = chromeos::NetworkMenuIcon::GetBitmap(network);
938 std::string iconURL = web_ui_util::GetImageDataUrl(iconBitmap);
939 dictionary.SetString("iconURL", iconURL);
940 dictionary.SetString("networkName", network->name());
941
937 // Only show proxy for remembered networks. 942 // Only show proxy for remembered networks.
938 chromeos::NetworkProfileType network_profile = network->profile_type(); 943 chromeos::NetworkProfileType network_profile = network->profile_type();
939 dictionary.SetBoolean("showProxy", network_profile != chromeos::PROFILE_NONE); 944 dictionary.SetBoolean("showProxy", network_profile != chromeos::PROFILE_NONE);
940 945
941 // Hide the dhcp/static radio if not ethernet or wifi (or if not enabled) 946 // Hide the dhcp/static radio if not ethernet or wifi (or if not enabled)
942 bool staticIPConfig = CommandLine::ForCurrentProcess()->HasSwitch( 947 bool staticIPConfig = CommandLine::ForCurrentProcess()->HasSwitch(
943 switches::kEnableStaticIPConfig); 948 switches::kEnableStaticIPConfig);
944 dictionary.SetBoolean("showStaticIPConfig", staticIPConfig && 949 dictionary.SetBoolean("showStaticIPConfig", staticIPConfig &&
945 (type == chromeos::TYPE_WIFI || type == chromeos::TYPE_ETHERNET)); 950 (type == chromeos::TYPE_WIFI || type == chromeos::TYPE_ETHERNET));
946 951
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
1410 if (default_value) 1415 if (default_value)
1411 value_dict->Set("default", default_value->DeepCopy()); 1416 value_dict->Set("default", default_value->DeepCopy());
1412 if (ui_data.managed()) 1417 if (ui_data.managed())
1413 value_dict->SetString("controlledBy", "policy"); 1418 value_dict->SetString("controlledBy", "policy");
1414 else if (ui_data.recommended()) 1419 else if (ui_data.recommended())
1415 value_dict->SetString("controlledBy", "recommended"); 1420 value_dict->SetString("controlledBy", "recommended");
1416 settings->Set(key, value_dict); 1421 settings->Set(key, value_dict);
1417 } 1422 }
1418 1423
1419 } // namespace options2 1424 } // namespace options2
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698