| Index: chrome/browser/ui/webui/chrome_web_contents_handler.cc
|
| ===================================================================
|
| --- chrome/browser/ui/webui/chrome_web_contents_handler.cc (revision 154307)
|
| +++ chrome/browser/ui/webui/chrome_web_contents_handler.cc (working copy)
|
| @@ -66,8 +66,8 @@
|
| // operation originated. |disposition| controls how the new tab should be
|
| // opened. |initial_pos| is the position of the window if a new window is
|
| // created. |user_gesture| is true if the operation was started by a user
|
| -// gesture.
|
| -void ChromeWebContentsHandler::AddNewContents(
|
| +// gesture. Returns false if the tab was blocked.
|
| +bool ChromeWebContentsHandler::AddNewContents(
|
| content::BrowserContext* context,
|
| WebContents* source,
|
| WebContents* new_contents,
|
| @@ -75,7 +75,7 @@
|
| const gfx::Rect& initial_pos,
|
| bool user_gesture) {
|
| if (!context)
|
| - return;
|
| + return false;
|
|
|
| Profile* profile = Profile::FromBrowserContext(context);
|
| Browser* browser = browser::FindTabbedBrowser(profile, false);
|
| @@ -96,4 +96,6 @@
|
| // Close the browser if chrome::Navigate created a new one.
|
| if (browser_created && (browser != params.browser))
|
| browser->window()->Close();
|
| +
|
| + return true;
|
| }
|
|
|