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

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

Issue 10938033: Switch BlockedContentTabHelper to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 3 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
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_adoption.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 3ebab50f3bb808d3fb41efe49bcda673f3435a95..5523076186fdb4e67bbc6bdde4c033ae167d9873 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -1421,12 +1421,10 @@ int Browser::GetExtraRenderViewHeight() const {
void Browser::OnStartDownload(WebContents* source,
content::DownloadItem* download) {
- TabContents* tab_contents = TabContents::FromWebContents(source);
- TabContents* constrained = GetConstrainingTabContents(tab_contents);
- if (constrained != tab_contents) {
+ WebContents* constrained = GetConstrainingWebContents(source);
+ if (constrained != source) {
// Download in a constrained popup is shown in the tab that opened it.
- WebContents* constrained_tab = constrained->web_contents();
- constrained_tab->GetDelegate()->OnStartDownload(constrained_tab, download);
+ constrained->GetDelegate()->OnStartDownload(constrained, download);
return;
}
@@ -1744,7 +1742,8 @@ void Browser::SetTabContentBlocked(TabContents* tab_contents, bool blocked) {
///////////////////////////////////////////////////////////////////////////////
// Browser, BlockedContentTabHelperDelegate implementation:
-TabContents* Browser::GetConstrainingTabContents(TabContents* source) {
+content::WebContents* Browser::GetConstrainingWebContents(
+ content::WebContents* source) {
return source;
}
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_adoption.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698