| Index: chrome/browser/automation/automation_provider.cc
|
| ===================================================================
|
| --- chrome/browser/automation/automation_provider.cc (revision 151481)
|
| +++ chrome/browser/automation/automation_provider.cc (working copy)
|
| @@ -468,11 +468,10 @@
|
|
|
| Browser* AutomationProvider::FindAndActivateTab(
|
| NavigationController* controller) {
|
| - int tab_index;
|
| - Browser* browser = browser::FindBrowserForController(controller, &tab_index);
|
| - if (browser)
|
| - chrome::ActivateTabAt(browser, tab_index, true);
|
| - return browser;
|
| + content::WebContentsDelegate* d = controller->GetWebContents()->GetDelegate();
|
| + if (d)
|
| + d->ActivateContents(controller->GetWebContents());
|
| + return browser::FindBrowserWithWebContents(controller->GetWebContents());
|
| }
|
|
|
| void AutomationProvider::HandleFindRequest(
|
|
|