| Index: chrome/browser/ui/browser_tabstrip.cc
|
| ===================================================================
|
| --- chrome/browser/ui/browser_tabstrip.cc (revision 153532)
|
| +++ chrome/browser/ui/browser_tabstrip.cc (working copy)
|
| @@ -94,7 +94,7 @@
|
| TabStripModel::ADD_ACTIVE);
|
| }
|
|
|
| -void AddWebContents(Browser* browser,
|
| +bool AddWebContents(Browser* browser,
|
| content::WebContents* source_contents,
|
| content::WebContents* new_contents,
|
| WindowOpenDisposition disposition,
|
| @@ -118,24 +118,23 @@
|
| }
|
|
|
| if (source_tab_contents) {
|
| - // Handle blocking of all contents.
|
| + // Handle blocking of tabs,
|
| if (source_blocked_content->all_contents_blocked()) {
|
| - source_blocked_content->AddTabContents(new_tab_contents,
|
| - disposition,
|
| - initial_pos,
|
| - user_gesture);
|
| - return;
|
| + source_blocked_content->AddTabContents(
|
| + new_tab_contents, disposition, initial_pos, user_gesture);
|
| + return false;
|
| }
|
|
|
| // Handle blocking of popups.
|
| - if ((disposition == NEW_POPUP) && !user_gesture &&
|
| + if ((disposition == NEW_POPUP || disposition == NEW_FOREGROUND_TAB) &&
|
| + !user_gesture &&
|
| !CommandLine::ForCurrentProcess()->HasSwitch(
|
| switches::kDisablePopupBlocking)) {
|
| // Unrequested popups from normal pages are constrained unless they're in
|
| // the white list. The popup owner will handle checking this.
|
| - source_tab_contents->blocked_content_tab_helper()->
|
| - AddPopup(new_tab_contents, initial_pos, user_gesture);
|
| - return;
|
| + source_blocked_content->AddPopup(
|
| + new_tab_contents, disposition, initial_pos, user_gesture);
|
| + return false;
|
| }
|
|
|
| new_contents->GetRenderViewHost()->DisassociateFromPopupCount();
|
| @@ -149,6 +148,7 @@
|
| params.window_action = NavigateParams::SHOW_WINDOW;
|
| params.user_gesture = user_gesture;
|
| Navigate(¶ms);
|
| + return true;
|
| }
|
|
|
| void CloseWebContents(Browser* browser, content::WebContents* contents) {
|
|
|