| 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 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 AdvancedOptionsUtilities::ShowManageSSLCertificates(web_ui_->tab_contents()); | 458 AdvancedOptionsUtilities::ShowManageSSLCertificates(web_ui_->tab_contents()); |
| 459 } | 459 } |
| 460 #endif | 460 #endif |
| 461 | 461 |
| 462 #if !defined(OS_CHROMEOS) | 462 #if !defined(OS_CHROMEOS) |
| 463 void AdvancedOptionsHandler::ShowCloudPrintSetupDialog(const ListValue* args) { | 463 void AdvancedOptionsHandler::ShowCloudPrintSetupDialog(const ListValue* args) { |
| 464 UserMetricsRecordAction(UserMetricsAction("Options_EnableCloudPrintProxy")); | 464 UserMetricsRecordAction(UserMetricsAction("Options_EnableCloudPrintProxy")); |
| 465 cloud_print_setup_handler_.reset(new CloudPrintSetupHandler(this)); | 465 cloud_print_setup_handler_.reset(new CloudPrintSetupHandler(this)); |
| 466 CloudPrintSetupFlow::OpenDialog( | 466 CloudPrintSetupFlow::OpenDialog( |
| 467 web_ui_->GetProfile(), cloud_print_setup_handler_->AsWeakPtr(), | 467 web_ui_->GetProfile(), cloud_print_setup_handler_->AsWeakPtr(), |
| 468 web_ui_->tab_contents()->GetMessageBoxRootWindow()); | 468 web_ui_->tab_contents()->GetDialogRootWindow()); |
| 469 } | 469 } |
| 470 | 470 |
| 471 void AdvancedOptionsHandler::HandleDisableCloudPrintProxy( | 471 void AdvancedOptionsHandler::HandleDisableCloudPrintProxy( |
| 472 const ListValue* args) { | 472 const ListValue* args) { |
| 473 UserMetricsRecordAction(UserMetricsAction("Options_DisableCloudPrintProxy")); | 473 UserMetricsRecordAction(UserMetricsAction("Options_DisableCloudPrintProxy")); |
| 474 web_ui_->GetProfile()->GetCloudPrintProxyService()->DisableForUser(); | 474 web_ui_->GetProfile()->GetCloudPrintProxyService()->DisableForUser(); |
| 475 } | 475 } |
| 476 | 476 |
| 477 void AdvancedOptionsHandler::ShowCloudPrintManagePage(const ListValue* args) { | 477 void AdvancedOptionsHandler::ShowCloudPrintManagePage(const ListValue* args) { |
| 478 UserMetricsRecordAction(UserMetricsAction("Options_ManageCloudPrinters")); | 478 UserMetricsRecordAction(UserMetricsAction("Options_ManageCloudPrinters")); |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 web_ui_->CallJavascriptFunction( | 632 web_ui_->CallJavascriptFunction( |
| 633 "options.AdvancedOptions.SetUseSSL3CheckboxState", checked, disabled); | 633 "options.AdvancedOptions.SetUseSSL3CheckboxState", checked, disabled); |
| 634 } | 634 } |
| 635 { | 635 { |
| 636 FundamentalValue checked(tls1_enabled_.GetValue()); | 636 FundamentalValue checked(tls1_enabled_.GetValue()); |
| 637 FundamentalValue disabled(tls1_enabled_.IsManaged()); | 637 FundamentalValue disabled(tls1_enabled_.IsManaged()); |
| 638 web_ui_->CallJavascriptFunction( | 638 web_ui_->CallJavascriptFunction( |
| 639 "options.AdvancedOptions.SetUseTLS1CheckboxState", checked, disabled); | 639 "options.AdvancedOptions.SetUseTLS1CheckboxState", checked, disabled); |
| 640 } | 640 } |
| 641 } | 641 } |
| OLD | NEW |