| 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/ui/webui/chromeos/choose_mobile_network_ui.h" | 5 #include "chrome/browser/ui/webui/chromeos/choose_mobile_network_ui.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 IDS_NETWORK_CHOOSE_MOBILE_NETWORK); | 59 IDS_NETWORK_CHOOSE_MOBILE_NETWORK); |
| 60 source->AddLocalizedString("scanningMsgLine1", | 60 source->AddLocalizedString("scanningMsgLine1", |
| 61 IDS_NETWORK_SCANNING_FOR_MOBILE_NETWORKS); | 61 IDS_NETWORK_SCANNING_FOR_MOBILE_NETWORKS); |
| 62 source->AddLocalizedString("scanningMsgLine2", | 62 source->AddLocalizedString("scanningMsgLine2", |
| 63 IDS_NETWORK_SCANNING_THIS_MAY_TAKE_A_MINUTE); | 63 IDS_NETWORK_SCANNING_THIS_MAY_TAKE_A_MINUTE); |
| 64 source->AddLocalizedString("noMobileNetworks", | 64 source->AddLocalizedString("noMobileNetworks", |
| 65 IDS_NETWORK_NO_MOBILE_NETWORKS); | 65 IDS_NETWORK_NO_MOBILE_NETWORKS); |
| 66 source->AddLocalizedString("connect", IDS_OPTIONS_SETTINGS_CONNECT); | 66 source->AddLocalizedString("connect", IDS_OPTIONS_SETTINGS_CONNECT); |
| 67 source->AddLocalizedString("cancel", IDS_CANCEL); | 67 source->AddLocalizedString("cancel", IDS_CANCEL); |
| 68 | 68 |
| 69 source->SetUseJsonJSFormatV2(); | |
| 70 source->SetJsonPath("strings.js"); | 69 source->SetJsonPath("strings.js"); |
| 71 source->AddResourcePath("choose_mobile_network.js", | 70 source->AddResourcePath("choose_mobile_network.js", |
| 72 IDR_CHOOSE_MOBILE_NETWORK_JS); | 71 IDR_CHOOSE_MOBILE_NETWORK_JS); |
| 73 source->SetDefaultResource(IDR_CHOOSE_MOBILE_NETWORK_HTML); | 72 source->SetDefaultResource(IDR_CHOOSE_MOBILE_NETWORK_HTML); |
| 74 return source; | 73 return source; |
| 75 } | 74 } |
| 76 | 75 |
| 77 chromeos::NetworkDeviceHandler* GetNetworkDeviceHandler() { | 76 chromeos::NetworkDeviceHandler* GetNetworkDeviceHandler() { |
| 78 return chromeos::NetworkHandler::Get()->network_device_handler(); | 77 return chromeos::NetworkHandler::Get()->network_device_handler(); |
| 79 } | 78 } |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 : WebUIController(web_ui) { | 256 : WebUIController(web_ui) { |
| 258 ChooseMobileNetworkHandler* handler = new ChooseMobileNetworkHandler(); | 257 ChooseMobileNetworkHandler* handler = new ChooseMobileNetworkHandler(); |
| 259 web_ui->AddMessageHandler(handler); | 258 web_ui->AddMessageHandler(handler); |
| 260 // Set up the "chrome://choose-mobile-network" source. | 259 // Set up the "chrome://choose-mobile-network" source. |
| 261 Profile* profile = Profile::FromWebUI(web_ui); | 260 Profile* profile = Profile::FromWebUI(web_ui); |
| 262 content::WebUIDataSource::Add( | 261 content::WebUIDataSource::Add( |
| 263 profile, CreateChooseMobileNetworkUIHTMLSource()); | 262 profile, CreateChooseMobileNetworkUIHTMLSource()); |
| 264 } | 263 } |
| 265 | 264 |
| 266 } // namespace chromeos | 265 } // namespace chromeos |
| OLD | NEW |