| Index: chrome/browser/extensions/extension_host.cc
|
| ===================================================================
|
| --- chrome/browser/extensions/extension_host.cc (revision 154307)
|
| +++ chrome/browser/extensions/extension_host.cc (working copy)
|
| @@ -591,7 +591,7 @@
|
| FileSelectHelper::RunFileChooser(tab, params);
|
| }
|
|
|
| -void ExtensionHost::AddNewContents(WebContents* source,
|
| +bool ExtensionHost::AddNewContents(WebContents* source,
|
| WebContents* new_contents,
|
| WindowOpenDisposition disposition,
|
| const gfx::Rect& initial_pos,
|
| @@ -609,14 +609,16 @@
|
| if (associated_contents &&
|
| associated_contents->GetBrowserContext() ==
|
| new_contents->GetBrowserContext()) {
|
| - associated_contents->AddNewContents(
|
| - new_contents, disposition, initial_pos, user_gesture);
|
| - return;
|
| + WebContentsDelegate* delegate = associated_contents->GetDelegate();
|
| + return delegate && delegate->AddNewContents(
|
| + associated_contents, new_contents, disposition, initial_pos,
|
| + user_gesture);
|
| }
|
| }
|
|
|
| ExtensionTabUtil::CreateTab(new_contents, extension_id_, disposition,
|
| initial_pos, user_gesture);
|
| + return true;
|
| }
|
|
|
| void ExtensionHost::RenderViewReady() {
|
|
|