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/advanced_options_handler.h" | 5 #include "chrome/browser/ui/webui/options/advanced_options_handler.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 RefreshCloudPrintStatusFromService(); | 195 RefreshCloudPrintStatusFromService(); |
196 } else { | 196 } else { |
197 RemoveCloudPrintProxySection(); | 197 RemoveCloudPrintProxySection(); |
198 } | 198 } |
199 #endif | 199 #endif |
200 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) | 200 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) |
201 SetupBackgroundModeSettings(); | 201 SetupBackgroundModeSettings(); |
202 #endif | 202 #endif |
203 | 203 |
204 banner_handler_.reset( | 204 banner_handler_.reset( |
205 new OptionsManagedBannerHandler(web_ui_, | 205 OptionsManagedBannerHandler::Create(web_ui_, |
206 ASCIIToUTF16("AdvancedOptions"), | 206 ASCIIToUTF16("AdvancedOptions"), |
207 OPTIONS_PAGE_ADVANCED)); | 207 OPTIONS_PAGE_ADVANCED)); |
208 } | 208 } |
209 | 209 |
210 WebUIMessageHandler* AdvancedOptionsHandler::Attach(WebUI* web_ui) { | 210 WebUIMessageHandler* AdvancedOptionsHandler::Attach(WebUI* web_ui) { |
211 // Call through to superclass. | 211 // Call through to superclass. |
212 WebUIMessageHandler* handler = OptionsPageUIHandler::Attach(web_ui); | 212 WebUIMessageHandler* handler = OptionsPageUIHandler::Attach(web_ui); |
213 | 213 |
214 // Register for preferences that we need to observe manually. These have | 214 // Register for preferences that we need to observe manually. These have |
215 // special behaviors that aren't handled by the standard prefs UI. | 215 // special behaviors that aren't handled by the standard prefs UI. |
216 DCHECK(web_ui_); | 216 DCHECK(web_ui_); |
217 PrefService* prefs = web_ui_->GetProfile()->GetPrefs(); | 217 PrefService* prefs = web_ui_->GetProfile()->GetPrefs(); |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
633 web_ui_->CallJavascriptFunction( | 633 web_ui_->CallJavascriptFunction( |
634 "options.AdvancedOptions.SetUseSSL3CheckboxState", checked, disabled); | 634 "options.AdvancedOptions.SetUseSSL3CheckboxState", checked, disabled); |
635 } | 635 } |
636 { | 636 { |
637 FundamentalValue checked(tls1_enabled_.GetValue()); | 637 FundamentalValue checked(tls1_enabled_.GetValue()); |
638 FundamentalValue disabled(tls1_enabled_.IsManaged()); | 638 FundamentalValue disabled(tls1_enabled_.IsManaged()); |
639 web_ui_->CallJavascriptFunction( | 639 web_ui_->CallJavascriptFunction( |
640 "options.AdvancedOptions.SetUseTLS1CheckboxState", checked, disabled); | 640 "options.AdvancedOptions.SetUseTLS1CheckboxState", checked, disabled); |
641 } | 641 } |
642 } | 642 } |
OLD | NEW |