Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5098)

Unified Diff: chrome/browser/ui/webui/chrome_web_contents_handler.cc

Issue 10868116: Pass result of blockage across content API when new tab blocked. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
}

Powered by Google App Engine
This is Rietveld 408576698