| Index: chrome/browser/automation/testing_automation_provider.cc
|
| diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
|
| index e1e8e46cf101ffe1e0f5c15393cdbc4b0da91ab6..f641ac2ab19b382046a346b23120366ae28e5a3d 100644
|
| --- a/chrome/browser/automation/testing_automation_provider.cc
|
| +++ b/chrome/browser/automation/testing_automation_provider.cc
|
| @@ -152,6 +152,10 @@
|
| #include "chrome/browser/download/download_shelf.h"
|
| #endif
|
|
|
| +#if defined(OS_MACOSX)
|
| +#include "base/mach_ipc_mac.h"
|
| +#endif
|
| +
|
| using automation::Error;
|
| using automation::ErrorCode;
|
| using automation_util::SendErrorIfModalDialogActive;
|
| @@ -319,6 +323,7 @@ bool TestingAutomationProvider::OnMessageReceived(
|
| IPC_MESSAGE_HANDLER_DELAY_REPLY(AutomationMsg_AppendTab, AppendTab)
|
| IPC_MESSAGE_HANDLER_DELAY_REPLY(AutomationMsg_AppendBackgroundTab,
|
| AppendBackgroundTab)
|
| + IPC_MESSAGE_HANDLER(AutomationMsg_GetMachPortCount, GetMachPortCount)
|
| IPC_MESSAGE_HANDLER(AutomationMsg_ActiveTabIndex, GetActiveTabIndex)
|
| IPC_MESSAGE_HANDLER_DELAY_REPLY(AutomationMsg_CloseTab, CloseTab)
|
| IPC_MESSAGE_HANDLER(AutomationMsg_GetCookies, GetCookies)
|
| @@ -599,6 +604,14 @@ void TestingAutomationProvider::AppendBackgroundTab(
|
| }
|
| }
|
|
|
| +void TestingAutomationProvider::GetMachPortCount(int* port_count) {
|
| +#if defined(OS_MACOSX)
|
| + base::mac::GetNumberOfMachPorts(mach_task_self(), port_count);
|
| +#else
|
| + *port_count = 0;
|
| +#endif
|
| +}
|
| +
|
| void TestingAutomationProvider::GetActiveTabIndex(int handle,
|
| int* active_tab_index) {
|
| *active_tab_index = -1; // -1 is the error code
|
|
|