| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/ui/webui/options2/chromeos/proxy_handler.h" | |
| 6 | |
| 7 #include "base/basictypes.h" | |
| 8 #include "base/callback.h" | |
| 9 #include "base/stl_util.h" | |
| 10 #include "base/time.h" | |
| 11 #include "base/utf_string_conversions.h" | |
| 12 #include "base/values.h" | |
| 13 #include "grit/chromium_strings.h" | |
| 14 #include "grit/generated_resources.h" | |
| 15 #include "grit/locale_settings.h" | |
| 16 #include "grit/theme_resources.h" | |
| 17 #include "ui/base/l10n/l10n_util.h" | |
| 18 #include "ui/base/resource/resource_bundle.h" | |
| 19 | |
| 20 namespace chromeos { | |
| 21 | |
| 22 ProxyHandler::ProxyHandler() { | |
| 23 } | |
| 24 | |
| 25 ProxyHandler::~ProxyHandler() { | |
| 26 } | |
| 27 | |
| 28 void ProxyHandler::GetLocalizedValues( | |
| 29 DictionaryValue* localized_strings) { | |
| 30 DCHECK(localized_strings); | |
| 31 // Proxy page - ChromeOS | |
| 32 localized_strings->SetString("proxyPage", | |
| 33 l10n_util::GetStringUTF16(IDS_OPTIONS_PROXY_TAB_LABEL)); | |
| 34 localized_strings->SetString("proxyPageTitleFormat", | |
| 35 l10n_util::GetStringUTF16(IDS_PROXY_PAGE_TITLE_FORMAT)); | |
| 36 localized_strings->SetString("proxy_config_title", | |
| 37 l10n_util::GetStringUTF16(IDS_PROXY_CONFIG_TITLE)); | |
| 38 localized_strings->SetString("proxyDirectInternetConnection", | |
| 39 l10n_util::GetStringUTF16(IDS_PROXY_DIRECT_CONNECTION)); | |
| 40 | |
| 41 localized_strings->SetString("proxyManual", | |
| 42 l10n_util::GetStringUTF16(IDS_PROXY_MANUAL_CONFIG)); | |
| 43 localized_strings->SetString("sameProxyProtocols", | |
| 44 l10n_util::GetStringUTF16(IDS_PROXY_SAME_FORALL)); | |
| 45 | |
| 46 localized_strings->SetString("httpProxy", | |
| 47 l10n_util::GetStringUTF16(IDS_PROXY_HTTP_PROXY)); | |
| 48 localized_strings->SetString("secureHttpProxy", | |
| 49 l10n_util::GetStringUTF16(IDS_PROXY_HTTP_SECURE_HTTP_PROXY)); | |
| 50 localized_strings->SetString("ftpProxy", | |
| 51 l10n_util::GetStringUTF16(IDS_PROXY_FTP_PROXY)); | |
| 52 localized_strings->SetString("socksHost", | |
| 53 l10n_util::GetStringUTF16(IDS_PROXY_SOCKS_HOST)); | |
| 54 localized_strings->SetString("proxyAutomatic", | |
| 55 l10n_util::GetStringUTF16(IDS_PROXY_AUTOMATIC)); | |
| 56 localized_strings->SetString("proxyConfigUrl", | |
| 57 l10n_util::GetStringUTF16(IDS_PROXY_CONFIG_URL)); | |
| 58 localized_strings->SetString("advanced_proxy_config", | |
| 59 l10n_util::GetStringUTF16(IDS_PROXY_ADVANCED_CONFIG)); | |
| 60 localized_strings->SetString("addHost", | |
| 61 l10n_util::GetStringUTF16(IDS_PROXY_ADD_HOST)); | |
| 62 localized_strings->SetString("removeHost", | |
| 63 l10n_util::GetStringUTF16(IDS_PROXY_REMOVE_HOST)); | |
| 64 localized_strings->SetString("proxyPort", | |
| 65 l10n_util::GetStringUTF16(IDS_PROXY_PORT)); | |
| 66 localized_strings->SetString("proxyBypass", | |
| 67 l10n_util::GetStringUTF16(IDS_PROXY_BYPASS)); | |
| 68 localized_strings->SetString("policyManagedPrefsBannerText", | |
| 69 l10n_util::GetStringUTF16(IDS_OPTIONS_POLICY_MANAGED_PREFS)); | |
| 70 localized_strings->SetString("extensionManagedPrefsBannerText", | |
| 71 l10n_util::GetStringUTF16(IDS_OPTIONS_EXTENSION_MANAGED_PREFS)); | |
| 72 localized_strings->SetString("unmodifiablePrefsBannerText", | |
| 73 l10n_util::GetStringUTF16(IDS_OPTIONS_UNMODIFIABLE_PREFS)); | |
| 74 localized_strings->SetString("enableSharedProxiesBannerText", | |
| 75 l10n_util::GetStringFUTF16( | |
| 76 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_ENABLE_SHARED_PROXIES_HINT, | |
| 77 l10n_util::GetStringUTF16(IDS_OPTIONS_SETTINGS_USE_SHARED_PROXIES))); | |
| 78 } | |
| 79 | |
| 80 void ProxyHandler::SetNetworkName(const std::string& name) { | |
| 81 StringValue network(name); | |
| 82 web_ui_->CallJavascriptFunction("options.ProxyOptions.setNetworkName", | |
| 83 network); | |
| 84 } | |
| 85 | |
| 86 } // namespace chromeos | |
| OLD | NEW |