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