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

Unified Diff: content/browser/loader/async_resource_handler.cc

Issue 2007203002: Revert of Add FrameHost mojo service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IWYU failure on revert Created 4 years, 7 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 | « content/browser/loader/DEPS ('k') | content/browser/loader/async_revalidation_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/async_resource_handler.cc
diff --git a/content/browser/loader/async_resource_handler.cc b/content/browser/loader/async_resource_handler.cc
index 3b3cb0c5b926d0db247ca97f2a391ecd9ec2dc0a..f570cea606b0de461ea72f40bdc06133da6f0431 100644
--- a/content/browser/loader/async_resource_handler.cc
+++ b/content/browser/loader/async_resource_handler.cc
@@ -17,6 +17,7 @@
#include "base/metrics/histogram_macros.h"
#include "base/strings/string_number_conversions.h"
#include "base/time/time.h"
+#include "content/browser/host_zoom_map_impl.h"
#include "content/browser/loader/netlog_observer.h"
#include "content/browser/loader/resource_buffer.h"
#include "content/browser/loader/resource_dispatcher_host_impl.h"
@@ -345,6 +346,21 @@ bool AsyncResourceHandler::OnResponseStarted(ResourceResponse* response,
NetLogObserver::PopulateResponseInfo(request(), response);
+ const HostZoomMapImpl* host_zoom_map =
+ static_cast<const HostZoomMapImpl*>(info->filter()->GetHostZoomMap());
+
+ if (info->GetResourceType() == RESOURCE_TYPE_MAIN_FRAME && host_zoom_map) {
+ const GURL& request_url = request()->url();
+ int render_process_id = info->GetChildID();
+ int render_view_id = info->GetRouteID();
+
+ double zoom_level = host_zoom_map->GetZoomLevelForView(
+ request_url, render_process_id, render_view_id);
+
+ info->filter()->Send(new ViewMsg_SetZoomLevelForLoadingURL(
+ render_view_id, request_url, zoom_level));
+ }
+
// If the parent handler downloaded the resource to a file, grant the child
// read permissions on it.
if (!response->head.download_file_path.empty()) {
« no previous file with comments | « content/browser/loader/DEPS ('k') | content/browser/loader/async_revalidation_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698