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

Side by Side Diff: chrome/browser/render_view_host.cc

Issue 8186: Plumb the referrer throughout the OpenURL APIs.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month 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 | « chrome/browser/render_view_host.h ('k') | chrome/browser/render_view_host_delegate.h » ('j') | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/browser/render_view_host.h" 5 #include "chrome/browser/render_view_host.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 DCHECK(enable_dom_ui_bindings_); 544 DCHECK(enable_dom_ui_bindings_);
545 Send(new ViewMsg_SetDOMUIProperty(routing_id_, name, value)); 545 Send(new ViewMsg_SetDOMUIProperty(routing_id_, name, value));
546 } 546 }
547 547
548 // static 548 // static
549 void RenderViewHost::MakeNavigateParams(const NavigationEntry& entry, 549 void RenderViewHost::MakeNavigateParams(const NavigationEntry& entry,
550 bool reload, 550 bool reload,
551 ViewMsg_Navigate_Params* params) { 551 ViewMsg_Navigate_Params* params) {
552 params->page_id = entry.page_id(); 552 params->page_id = entry.page_id();
553 params->url = entry.url(); 553 params->url = entry.url();
554 params->referrer = entry.referrer();
554 params->transition = entry.transition_type(); 555 params->transition = entry.transition_type();
555 params->state = entry.content_state(); 556 params->state = entry.content_state();
556 params->reload = reload; 557 params->reload = reload;
557 } 558 }
558 559
559 bool RenderViewHost::CanBlur() const { 560 bool RenderViewHost::CanBlur() const {
560 return delegate_->CanBlur(); 561 return delegate_->CanBlur();
561 } 562 }
562 563
563 void RenderViewHost::SetInitialFocus(bool reverse) { 564 void RenderViewHost::SetInitialFocus(bool reverse) {
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
965 966
966 FilterURL(policy, renderer_id, &validated_params.link_url); 967 FilterURL(policy, renderer_id, &validated_params.link_url);
967 FilterURL(policy, renderer_id, &validated_params.image_url); 968 FilterURL(policy, renderer_id, &validated_params.image_url);
968 FilterURL(policy, renderer_id, &validated_params.page_url); 969 FilterURL(policy, renderer_id, &validated_params.page_url);
969 FilterURL(policy, renderer_id, &validated_params.frame_url); 970 FilterURL(policy, renderer_id, &validated_params.frame_url);
970 971
971 view->ShowContextMenu(validated_params); 972 view->ShowContextMenu(validated_params);
972 } 973 }
973 974
974 void RenderViewHost::OnMsgOpenURL(const GURL& url, 975 void RenderViewHost::OnMsgOpenURL(const GURL& url,
976 const GURL& referrer,
975 WindowOpenDisposition disposition) { 977 WindowOpenDisposition disposition) {
976 GURL validated_url(url); 978 GURL validated_url(url);
977 FilterURL(RendererSecurityPolicy::GetInstance(), 979 FilterURL(RendererSecurityPolicy::GetInstance(),
978 process()->host_id(), &validated_url); 980 process()->host_id(), &validated_url);
979 981
980 delegate_->RequestOpenURL(validated_url, disposition); 982 delegate_->RequestOpenURL(validated_url, referrer, disposition);
981 } 983 }
982 984
983 void RenderViewHost::OnMsgDomOperationResponse( 985 void RenderViewHost::OnMsgDomOperationResponse(
984 const std::string& json_string, int automation_id) { 986 const std::string& json_string, int automation_id) {
985 delegate_->DomOperationResponse(json_string, automation_id); 987 delegate_->DomOperationResponse(json_string, automation_id);
986 } 988 }
987 989
988 void RenderViewHost::OnMsgDOMUISend( 990 void RenderViewHost::OnMsgDOMUISend(
989 const std::string& message, const std::string& content) { 991 const std::string& message, const std::string& content) {
990 if (!RendererSecurityPolicy::GetInstance()-> 992 if (!RendererSecurityPolicy::GetInstance()->
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
1235 Send(new ViewMsg_PersonalizationEvent(routing_id_, 1237 Send(new ViewMsg_PersonalizationEvent(routing_id_,
1236 event_name, 1238 event_name,
1237 event_arg)); 1239 event_arg));
1238 } 1240 }
1239 #endif 1241 #endif
1240 1242
1241 void RenderViewHost::ForwardMessageFromExternalHost( 1243 void RenderViewHost::ForwardMessageFromExternalHost(
1242 const std::string& target, const std::string& message) { 1244 const std::string& target, const std::string& message) {
1243 Send(new ViewMsg_HandleMessageFromExternalHost(routing_id_, target, message)); 1245 Send(new ViewMsg_HandleMessageFromExternalHost(routing_id_, target, message));
1244 } 1246 }
OLDNEW
« no previous file with comments | « chrome/browser/render_view_host.h ('k') | chrome/browser/render_view_host_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698