| 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/extensions/extension_settings_handler.h" | 5 #include "chrome/browser/ui/webui/extensions/extension_settings_handler.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/base64.h" | 8 #include "base/base64.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 778 if (!extension_id_prompting_.empty()) | 778 if (!extension_id_prompting_.empty()) |
| 779 return; // Only one prompt at a time. | 779 return; // Only one prompt at a time. |
| 780 | 780 |
| 781 extension_id_prompting_ = extension_id; | 781 extension_id_prompting_ = extension_id; |
| 782 | 782 |
| 783 GetExtensionUninstallDialog()->ConfirmUninstall(extension); | 783 GetExtensionUninstallDialog()->ConfirmUninstall(extension); |
| 784 } | 784 } |
| 785 | 785 |
| 786 void ExtensionSettingsHandler::HandleOptionsMessage(const ListValue* args) { | 786 void ExtensionSettingsHandler::HandleOptionsMessage(const ListValue* args) { |
| 787 const Extension* extension = GetActiveExtension(args); | 787 const Extension* extension = GetActiveExtension(args); |
| 788 if (!extension || extension->options_url().is_empty()) | 788 if (!extension || ManifestURLInfo::GetOptionsPage(extension).is_empty()) |
| 789 return; | 789 return; |
| 790 extensions::ExtensionSystem::Get(Profile::FromWebUI(web_ui()))-> | 790 extensions::ExtensionSystem::Get(Profile::FromWebUI(web_ui()))-> |
| 791 process_manager()->OpenOptionsPage(extension, | 791 process_manager()->OpenOptionsPage(extension, |
| 792 chrome::FindBrowserWithWebContents(web_ui()->GetWebContents())); | 792 chrome::FindBrowserWithWebContents(web_ui()->GetWebContents())); |
| 793 } | 793 } |
| 794 | 794 |
| 795 void ExtensionSettingsHandler::HandleShowButtonMessage(const ListValue* args) { | 795 void ExtensionSettingsHandler::HandleShowButtonMessage(const ListValue* args) { |
| 796 const Extension* extension = GetActiveExtension(args); | 796 const Extension* extension = GetActiveExtension(args); |
| 797 if (!extension) | 797 if (!extension) |
| 798 return; | 798 return; |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1004 std::vector<std::string> requirement_errors) { | 1004 std::vector<std::string> requirement_errors) { |
| 1005 if (requirement_errors.empty()) { | 1005 if (requirement_errors.empty()) { |
| 1006 extension_service_->EnableExtension(extension_id); | 1006 extension_service_->EnableExtension(extension_id); |
| 1007 } else { | 1007 } else { |
| 1008 ExtensionErrorReporter::GetInstance()->ReportError( | 1008 ExtensionErrorReporter::GetInstance()->ReportError( |
| 1009 UTF8ToUTF16(JoinString(requirement_errors, ' ')), | 1009 UTF8ToUTF16(JoinString(requirement_errors, ' ')), |
| 1010 true /* be noisy */); | 1010 true /* be noisy */); |
| 1011 } | 1011 } |
| 1012 requirements_checker_.reset(); | 1012 requirements_checker_.reset(); |
| 1013 } | 1013 } |
| OLD | NEW |