summaryrefslogtreecommitdiffstats
path: root/content/browser/web_contents/web_contents_impl.cc
diff options
context:
space:
mode:
authormkosiba@chromium.org <mkosiba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-31 16:25:58 +0000
committermkosiba@chromium.org <mkosiba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-31 16:25:58 +0000
commit988ed713b014dc55b3e82fa659a2136e360283ac (patch)
tree4ec83ecb2c009dd8d3a2615def5d35ed0fe266db /content/browser/web_contents/web_contents_impl.cc
parenta22a200b2981fa2a1316fac420047056fa237146 (diff)
downloadchromium_src-988ed713b014dc55b3e82fa659a2136e360283ac.zip
chromium_src-988ed713b014dc55b3e82fa659a2136e360283ac.tar.gz
chromium_src-988ed713b014dc55b3e82fa659a2136e360283ac.tar.bz2
Change ImageLoadingHelper to be a RenderFrameObserver.
BUG=304341 Review URL: https://codereview.chromium.org/190633012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260558 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/web_contents/web_contents_impl.cc')
-rw-r--r--content/browser/web_contents/web_contents_impl.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 005f768..32eef98 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -170,12 +170,12 @@ const char kWebContentsAndroidKey[] = "web_contents_android";
base::LazyInstance<std::vector<WebContentsImpl::CreatedCallback> >
g_created_callbacks = LAZY_INSTANCE_INITIALIZER;
-static int StartDownload(content::RenderViewHost* rvh,
+static int StartDownload(content::RenderFrameHost* rfh,
const GURL& url,
bool is_favicon,
uint32_t max_bitmap_size) {
static int g_next_image_download_id = 0;
- rvh->Send(new ImageMsg_DownloadImage(rvh->GetRoutingID(),
+ rfh->Send(new ImageMsg_DownloadImage(rfh->GetRoutingID(),
++g_next_image_download_id,
url,
is_favicon,
@@ -2061,8 +2061,7 @@ int WebContentsImpl::DownloadImage(const GURL& url,
bool is_favicon,
uint32_t max_bitmap_size,
const ImageDownloadCallback& callback) {
- RenderViewHost* host = GetRenderViewHost();
- int id = StartDownload(host, url, is_favicon, max_bitmap_size);
+ int id = StartDownload(GetMainFrame(), url, is_favicon, max_bitmap_size);
image_download_map_[id] = callback;
return id;
}