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

Unified Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 1085783002: Replace image_messages.h with Mojo service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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: content/browser/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index d4cc6f50c5f352ef7c908d8f5601785b97335ec6..efa33e3cc25ab35701d54241f0e1626bfce00699 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -1750,6 +1750,9 @@ void RenderFrameHostImpl::InvalidateMojoConnection() {
#endif
service_registry_.reset();
+
+ // Disconnect with ImageDownloader Mojo service in render frame.
nasko 2015/04/15 20:57:22 nit: s/render frame/RenderFrame/
leonhsl(Using Gerrit) 2015/04/17 06:14:34 Done.
+ image_downloader_dispatcher_.reset();
}
bool RenderFrameHostImpl::IsFocused() {
@@ -1762,6 +1765,19 @@ bool RenderFrameHostImpl::IsFocused() {
frame_tree_->GetFocusedFrame()->IsDescendantOf(frame_tree_node()));
}
+int RenderFrameHostImpl::DownloadImage(
+ const GURL& url,
+ bool is_favicon,
+ uint32_t max_bitmap_size,
+ bool bypass_cache,
+ const WebContents::ImageDownloadCallback& callback) {
+ if (!image_downloader_dispatcher_)
+ image_downloader_dispatcher_.reset(new ImageDownloaderDispatcher(this));
+
+ return image_downloader_dispatcher_->StartDownload(
+ url, is_favicon, max_bitmap_size, bypass_cache, callback);
+}
+
void RenderFrameHostImpl::UpdateCrossProcessIframeAccessibility(
const std::map<int32, int>& node_to_frame_routing_id_map) {
for (const auto& iter : node_to_frame_routing_id_map) {

Powered by Google App Engine
This is Rietveld 408576698