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

Side by Side Diff: chrome/renderer/render_view.cc

Issue 2850037: If we're setting a frame's content settings based on its opener,... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/renderer/render_view.h" 5 #include "chrome/renderer/render_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1276 matching lines...) Expand 10 before | Expand all | Expand 10 after
1287 HostContentSettings::iterator host_content_settings = 1287 HostContentSettings::iterator host_content_settings =
1288 host_content_settings_.find(GURL(request.url())); 1288 host_content_settings_.find(GURL(request.url()));
1289 if (host_content_settings != host_content_settings_.end()) { 1289 if (host_content_settings != host_content_settings_.end()) {
1290 SetContentSettings(host_content_settings->second); 1290 SetContentSettings(host_content_settings->second);
1291 1291
1292 // These content settings were merely recorded transiently for this load. 1292 // These content settings were merely recorded transiently for this load.
1293 // We can erase them now. If at some point we reload this page, the 1293 // We can erase them now. If at some point we reload this page, the
1294 // browser will send us new, up-to-date content settings. 1294 // browser will send us new, up-to-date content settings.
1295 host_content_settings_.erase(host_content_settings); 1295 host_content_settings_.erase(host_content_settings);
1296 } else if (frame->opener()) { 1296 } else if (frame->opener()) {
1297 WebView* opener_view = frame->opener()->view(); 1297 // The opener's view is not guaranteed to be non-null (it could be
1298 RenderView* opener = FromWebView(opener_view); 1298 // detached from its page but not yet destructed).
1299 SetContentSettings(opener->current_content_settings_); 1299 if (WebView* opener_view = frame->opener()->view()) {
1300 RenderView* opener = FromWebView(opener_view);
1301 SetContentSettings(opener->current_content_settings_);
1302 }
1300 } 1303 }
1301 1304
1302 // Set zoom level. 1305 // Set zoom level.
1303 HostZoomLevels::iterator host_zoom = 1306 HostZoomLevels::iterator host_zoom =
1304 host_zoom_levels_.find(GURL(request.url())); 1307 host_zoom_levels_.find(GURL(request.url()));
1305 if (host_zoom != host_zoom_levels_.end()) { 1308 if (host_zoom != host_zoom_levels_.end()) {
1306 webview()->setZoomLevel(false, host_zoom->second); 1309 webview()->setZoomLevel(false, host_zoom->second);
1307 // This zoom level was merely recorded transiently for this load. We can 1310 // This zoom level was merely recorded transiently for this load. We can
1308 // erase it now. If at some point we reload this page, the browser will 1311 // erase it now. If at some point we reload this page, the browser will
1309 // send us a new, up-to-date zoom level. 1312 // send us a new, up-to-date zoom level.
(...skipping 3946 matching lines...) Expand 10 before | Expand all | Expand 10 after
5256 webkit_glue::FormData form; 5259 webkit_glue::FormData form;
5257 const WebInputElement element = node.toConst<WebInputElement>(); 5260 const WebInputElement element = node.toConst<WebInputElement>();
5258 if (!form_manager_.FindFormWithFormControlElement( 5261 if (!form_manager_.FindFormWithFormControlElement(
5259 element, FormManager::REQUIRE_NONE, &form)) 5262 element, FormManager::REQUIRE_NONE, &form))
5260 return; 5263 return;
5261 5264
5262 autofill_action_ = action; 5265 autofill_action_ = action;
5263 Send(new ViewHostMsg_FillAutoFillFormData( 5266 Send(new ViewHostMsg_FillAutoFillFormData(
5264 routing_id_, autofill_query_id_, form, value, label)); 5267 routing_id_, autofill_query_id_, form, value, label));
5265 } 5268 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698