OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/dom_ui/network_menu_ui.h" | 5 #include "chrome/browser/chromeos/dom_ui/network_menu_ui.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 // Network menu specific values. | 178 // Network menu specific values. |
179 const NetworkMenu* network_menu = static_cast<const NetworkMenu*>(model); | 179 const NetworkMenu* network_menu = static_cast<const NetworkMenu*>(model); |
180 NetworkMenu::NetworkInfo info; | 180 NetworkMenu::NetworkInfo info; |
181 bool found = network_menu->GetNetworkAt(index, &info); | 181 bool found = network_menu->GetNetworkAt(index, &info); |
182 | 182 |
183 item->SetBoolean("visible", found); | 183 item->SetBoolean("visible", found); |
184 item->SetString("network_type", info.network_type); | 184 item->SetString("network_type", info.network_type); |
185 item->SetString("status", info.status); | 185 item->SetString("status", info.status); |
186 item->SetString("message", info.message); | 186 item->SetString("message", info.message); |
187 item->SetString("ip_address", info.ip_address); | 187 item->SetString("ip_address", info.ip_address); |
| 188 item->SetString("passphrase", info.passphrase); |
188 item->SetBoolean("need_passphrase", info.need_passphrase); | 189 item->SetBoolean("need_passphrase", info.need_passphrase); |
189 item->SetBoolean("remembered", info.remembered); | 190 item->SetBoolean("remembered", info.remembered); |
190 return item; | 191 return item; |
191 } | 192 } |
192 | 193 |
193 views::Menu2* NetworkMenuUI::CreateMenu2(menus::MenuModel* model) { | 194 views::Menu2* NetworkMenuUI::CreateMenu2(menus::MenuModel* model) { |
194 views::Menu2* menu = new views::Menu2(model); | 195 views::Menu2* menu = new views::Menu2(model); |
195 NativeMenuDOMUI::SetMenuURL( | 196 NativeMenuDOMUI::SetMenuURL( |
196 menu, GURL(StringPrintf("chrome://%s", chrome::kChromeUINetworkMenu))); | 197 menu, GURL(StringPrintf("chrome://%s", chrome::kChromeUINetworkMenu))); |
197 return menu; | 198 return menu; |
198 } | 199 } |
199 | 200 |
200 } // namespace chromeos | 201 } // namespace chromeos |
OLD | NEW |