| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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/options/chromeos/proxy_handler.h" | 5 #include "chrome/browser/ui/webui/options/chromeos/proxy_handler.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
| 10 #include "base/time.h" | 10 #include "base/time.h" |
| 11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
| 12 #include "base/values.h" | 12 #include "base/values.h" |
| 13 #include "chrome/browser/chromeos/proxy_cros_settings_provider.h" | |
| 14 #include "grit/chromium_strings.h" | 13 #include "grit/chromium_strings.h" |
| 15 #include "grit/generated_resources.h" | 14 #include "grit/generated_resources.h" |
| 16 #include "grit/locale_settings.h" | 15 #include "grit/locale_settings.h" |
| 17 #include "grit/theme_resources.h" | 16 #include "grit/theme_resources.h" |
| 18 #include "ui/base/l10n/l10n_util.h" | 17 #include "ui/base/l10n/l10n_util.h" |
| 19 #include "ui/base/resource/resource_bundle.h" | 18 #include "ui/base/resource/resource_bundle.h" |
| 20 | 19 |
| 21 namespace chromeos { | 20 namespace chromeos { |
| 22 | 21 |
| 23 ProxyHandler::ProxyHandler(Profile* profile) | 22 ProxyHandler::ProxyHandler() { |
| 24 : CrosOptionsPageUIHandler(new ProxyCrosSettingsProvider(profile)) { | |
| 25 } | 23 } |
| 26 | 24 |
| 27 ProxyHandler::~ProxyHandler() { | 25 ProxyHandler::~ProxyHandler() { |
| 28 } | 26 } |
| 29 | 27 |
| 30 void ProxyHandler::GetLocalizedValues( | 28 void ProxyHandler::GetLocalizedValues( |
| 31 DictionaryValue* localized_strings) { | 29 DictionaryValue* localized_strings) { |
| 32 DCHECK(localized_strings); | 30 DCHECK(localized_strings); |
| 33 // Proxy page - ChromeOS | 31 // Proxy page - ChromeOS |
| 34 localized_strings->SetString("proxyPage", | 32 localized_strings->SetString("proxyPage", |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 l10n_util::GetStringUTF16(IDS_OPTIONS_SETTINGS_USE_SHARED_PROXIES))); | 77 l10n_util::GetStringUTF16(IDS_OPTIONS_SETTINGS_USE_SHARED_PROXIES))); |
| 80 } | 78 } |
| 81 | 79 |
| 82 void ProxyHandler::SetNetworkName(const std::string& name) { | 80 void ProxyHandler::SetNetworkName(const std::string& name) { |
| 83 StringValue network(name); | 81 StringValue network(name); |
| 84 web_ui_->CallJavascriptFunction("options.ProxyOptions.setNetworkName", | 82 web_ui_->CallJavascriptFunction("options.ProxyOptions.setNetworkName", |
| 85 network); | 83 network); |
| 86 } | 84 } |
| 87 | 85 |
| 88 } // namespace chromeos | 86 } // namespace chromeos |
| OLD | NEW |