| 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/automation/testing_automation_provider.h" | 5 #include "chrome/browser/automation/testing_automation_provider.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 4016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4027 extension_value->SetString("description", extension->description()); | 4027 extension_value->SetString("description", extension->description()); |
| 4028 extension_value->SetString("background_url", | 4028 extension_value->SetString("background_url", |
| 4029 extension->background_url().spec()); | 4029 extension->background_url().spec()); |
| 4030 extension_value->SetString("options_url", | 4030 extension_value->SetString("options_url", |
| 4031 extension->options_url().spec()); | 4031 extension->options_url().spec()); |
| 4032 extension_value->Set("host_permissions", | 4032 extension_value->Set("host_permissions", |
| 4033 GetHostPermissions(extension, false)); | 4033 GetHostPermissions(extension, false)); |
| 4034 extension_value->Set("effective_host_permissions", | 4034 extension_value->Set("effective_host_permissions", |
| 4035 GetHostPermissions(extension, true)); | 4035 GetHostPermissions(extension, true)); |
| 4036 extension_value->Set("api_permissions", GetAPIPermissions(extension)); | 4036 extension_value->Set("api_permissions", GetAPIPermissions(extension)); |
| 4037 extension_value->SetBoolean("is_component_extension", |
| 4038 extension->location() == Extension::COMPONENT); |
| 4037 extensions_values->Append(extension_value); | 4039 extensions_values->Append(extension_value); |
| 4038 } | 4040 } |
| 4039 return_value->Set("extensions", extensions_values); | 4041 return_value->Set("extensions", extensions_values); |
| 4040 reply.SendSuccess(return_value.get()); | 4042 reply.SendSuccess(return_value.get()); |
| 4041 } | 4043 } |
| 4042 | 4044 |
| 4043 // See UninstallExtensionById() in chrome/test/pyautolib/pyauto.py for sample | 4045 // See UninstallExtensionById() in chrome/test/pyautolib/pyauto.py for sample |
| 4044 // json input. | 4046 // json input. |
| 4045 // Sample json output: {} | 4047 // Sample json output: {} |
| 4046 void TestingAutomationProvider::UninstallExtensionById( | 4048 void TestingAutomationProvider::UninstallExtensionById( |
| (...skipping 1818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5865 IPC::ParamTraits<std::vector<GURL> >::Write(reply_message_, redirects_gurl); | 5867 IPC::ParamTraits<std::vector<GURL> >::Write(reply_message_, redirects_gurl); |
| 5866 | 5868 |
| 5867 Send(reply_message_); | 5869 Send(reply_message_); |
| 5868 redirect_query_ = 0; | 5870 redirect_query_ = 0; |
| 5869 reply_message_ = NULL; | 5871 reply_message_ = NULL; |
| 5870 } | 5872 } |
| 5871 | 5873 |
| 5872 void TestingAutomationProvider::OnRemoveProvider() { | 5874 void TestingAutomationProvider::OnRemoveProvider() { |
| 5873 AutomationProviderList::GetInstance()->RemoveProvider(this); | 5875 AutomationProviderList::GetInstance()->RemoveProvider(this); |
| 5874 } | 5876 } |
| OLD | NEW |