| 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 8278cc6eb6be9e1de77a835786b370188d46aefc..c459997c3c5cc075f31843fad14f0ca4da38a3e1 100644
|
| --- a/chrome/browser/automation/testing_automation_provider.cc
|
| +++ b/chrome/browser/automation/testing_automation_provider.cc
|
| @@ -398,6 +398,8 @@ bool TestingAutomationProvider::OnMessageReceived(
|
| IPC_MESSAGE_HANDLER_DELAY_REPLY(
|
| AutomationMsg_WaitForProcessLauncherThreadToGoIdle,
|
| WaitForProcessLauncherThreadToGoIdle)
|
| + IPC_MESSAGE_HANDLER(AutomationMsg_GetParentBrowserOfTab,
|
| + GetParentBrowserOfTab)
|
|
|
| IPC_MESSAGE_UNHANDLED(
|
| handled = AutomationProvider::OnMessageReceived(message))
|
| @@ -4618,6 +4620,21 @@ void TestingAutomationProvider::WaitForProcessLauncherThreadToGoIdle(
|
| new WaitForProcessLauncherThreadToGoIdleObserver(this, reply_message);
|
| }
|
|
|
| +void TestingAutomationProvider::GetParentBrowserOfTab(int tab_handle,
|
| + int* browser_handle,
|
| + bool* success) {
|
| + *success = false;
|
| + if (tab_tracker_->ContainsHandle(tab_handle)) {
|
| + NavigationController* controller = tab_tracker_->GetResource(tab_handle);
|
| + int index;
|
| + Browser* browser = Browser::GetBrowserForController(controller, &index);
|
| + if (browser) {
|
| + *browser_handle = browser_tracker_->Add(browser);
|
| + *success = true;
|
| + }
|
| + }
|
| +}
|
| +
|
| // TODO(brettw) change this to accept GURLs when history supports it
|
| void TestingAutomationProvider::OnRedirectQueryComplete(
|
| HistoryService::Handle request_handle,
|
|
|