| Index: chrome/browser/ui/blocked_content/blocked_content_container.cc
|
| ===================================================================
|
| --- chrome/browser/ui/blocked_content/blocked_content_container.cc (revision 154307)
|
| +++ chrome/browser/ui/blocked_content/blocked_content_container.cc (working copy)
|
| @@ -75,11 +75,14 @@
|
| tab_contents->blocked_content_tab_helper()->set_delegate(NULL);
|
| // We needn't call WasShown to change its status because the
|
| // WebContents::AddNewContents will do it.
|
| - owner_->web_contents()->AddNewContents(
|
| - tab_contents->web_contents(),
|
| - content.disposition,
|
| - content.bounds,
|
| - content.user_gesture);
|
| + WebContentsDelegate* delegate = owner_->web_contents()->GetDelegate();
|
| + if (delegate) {
|
| + delegate->AddNewContents(owner_->web_contents(),
|
| + tab_contents->web_contents(),
|
| + content.disposition,
|
| + content.bounds,
|
| + content.user_gesture);
|
| + }
|
| break;
|
| }
|
| }
|
| @@ -116,13 +119,17 @@
|
| return owner_->web_contents()->OpenURL(params);
|
| }
|
|
|
| -void BlockedContentContainer::AddNewContents(WebContents* source,
|
| +bool BlockedContentContainer::AddNewContents(WebContents* source,
|
| WebContents* new_contents,
|
| WindowOpenDisposition disposition,
|
| const gfx::Rect& initial_position,
|
| bool user_gesture) {
|
| - owner_->web_contents()->AddNewContents(
|
| - new_contents, disposition, initial_position, user_gesture);
|
| + WebContentsDelegate* delegate = owner_->web_contents()->GetDelegate();
|
| + if (delegate) {
|
| + delegate->AddNewContents(owner_->web_contents(), new_contents,
|
| + disposition, initial_position, user_gesture);
|
| + }
|
| + return true;
|
| }
|
|
|
| void BlockedContentContainer::CloseContents(WebContents* source) {
|
|
|