summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host/async_resource_handler.cc
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-30 09:31:01 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-30 09:31:01 +0000
commitf85f070f8fca83ca373929584218d7185ff89220 (patch)
tree0933796547053b57ac5cc69a17537f957879a0b1 /chrome/browser/renderer_host/async_resource_handler.cc
parenteaa4d15649601d4ec30136264825ccde40d91907 (diff)
downloadchromium_src-f85f070f8fca83ca373929584218d7185ff89220.zip
chromium_src-f85f070f8fca83ca373929584218d7185ff89220.tar.gz
chromium_src-f85f070f8fca83ca373929584218d7185ff89220.tar.bz2
IPC per-host content settings to the renderers.
BUG=32719 TEST=none Review URL: http://codereview.chromium.org/549218 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37628 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host/async_resource_handler.cc')
-rw-r--r--chrome/browser/renderer_host/async_resource_handler.cc15
1 files changed, 9 insertions, 6 deletions
diff --git a/chrome/browser/renderer_host/async_resource_handler.cc b/chrome/browser/renderer_host/async_resource_handler.cc
index 7b5e8c2..6cba3f4 100644
--- a/chrome/browser/renderer_host/async_resource_handler.cc
+++ b/chrome/browser/renderer_host/async_resource_handler.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -100,11 +100,11 @@ bool AsyncResourceHandler::OnRequestRedirected(int request_id,
bool AsyncResourceHandler::OnResponseStarted(int request_id,
ResourceResponse* response) {
- // For changes to the main frame, inform the renderer of the new URL's zoom
- // level before the request actually commits. This way the renderer will be
- // able to set the zoom level precisely at the time the request commits,
- // avoiding the possibility of zooming the old content or of having to layout
- // the new content twice.
+ // For changes to the main frame, inform the renderer of the new URL's
+ // per-host settings before the request actually commits. This way the
+ // renderer will be able to set these precisely at the time the
+ // request commits, avoiding the possibility of e.g. zooming the old content
+ // or of having to layout the new content twice.
URLRequest* request = rdh_->GetURLRequest(
GlobalRequestID(process_id_, request_id));
ResourceDispatcherHostRequestInfo* info = rdh_->InfoForRequest(request);
@@ -113,6 +113,9 @@ bool AsyncResourceHandler::OnResponseStarted(int request_id,
ChromeURLRequestContext* context =
static_cast<ChromeURLRequestContext*>(request->context());
if (!host.empty() && context) {
+ receiver_->Send(new ViewMsg_SetContentSettingsForLoadingHost(
+ info->route_id(), host,
+ context->host_content_settings_map()->GetContentSettings(host)));
receiver_->Send(new ViewMsg_SetZoomLevelForLoadingHost(info->route_id(),
host, context->host_zoom_map()->GetZoomLevel(host)));
}