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

Unified Diff: chrome/browser/extensions/extension_host.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/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() {

Powered by Google App Engine
This is Rietveld 408576698