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

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: Fix review comments on set7 Created 5 years, 5 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 8dc4395003b355fffabc072338aeeb9e7e51a4e3..884aaaabb7b03dc64c8b3891fb20c090df9aac32 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -1852,6 +1852,9 @@ void RenderFrameHostImpl::InvalidateMojoConnection() {
#endif
service_registry_.reset();
+
+ // Disconnect with ImageDownloader Mojo service in RenderFrame.
+ mojo_image_downloader_.reset();
}
bool RenderFrameHostImpl::IsFocused() {
@@ -1864,6 +1867,15 @@ bool RenderFrameHostImpl::IsFocused() {
frame_tree_->GetFocusedFrame()->IsDescendantOf(frame_tree_node()));
}
+const image_downloader::ImageDownloaderPtr&
+RenderFrameHostImpl::GetMojoImageDownloader() {
+ if (!mojo_image_downloader_.get()) {
+ GetServiceRegistry()->ConnectToRemoteService(
+ mojo::GetProxy(&mojo_image_downloader_));
+ }
+ return mojo_image_downloader_;
+}
+
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