diff options
Diffstat (limited to 'chrome/browser/automation/automation_provider.cc')
-rw-r--r-- | chrome/browser/automation/automation_provider.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc index 998b252..8ae593b 100644 --- a/chrome/browser/automation/automation_provider.cc +++ b/chrome/browser/automation/automation_provider.cc @@ -484,6 +484,8 @@ void AutomationProvider::OnMessageReceived(const IPC::Message& message) { InstallExtension) IPC_MESSAGE_HANDLER_DELAY_REPLY(AutomationMsg_LoadExpandedExtension, LoadExpandedExtension) + IPC_MESSAGE_HANDLER(AutomationMsg_GetEnabledExtensions, + GetEnabledExtensions) IPC_MESSAGE_HANDLER(AutomationMsg_ShutdownSessionService, ShutdownSessionService) IPC_MESSAGE_HANDLER(AutomationMsg_SaveAsAsync, SaveAsAsync) @@ -2482,6 +2484,21 @@ void AutomationProvider::LoadExpandedExtension( } } +void AutomationProvider::GetEnabledExtensions( + std::vector<FilePath>* result) { + ExtensionsService* service = profile_->GetExtensionsService(); + DCHECK(service); + if (service->extensions_enabled()) { + const ExtensionList* extensions = service->extensions(); + DCHECK(extensions); + for (size_t i = 0; i < extensions->size(); ++i) { + Extension* extension = (*extensions)[i]; + DCHECK(extension); + result->push_back(extension->path()); + } + } +} + void AutomationProvider::SaveAsAsync(int tab_handle) { NavigationController* tab = NULL; TabContents* tab_contents = GetTabContentsForHandle(tab_handle, &tab); |