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

Side by Side Diff: content/renderer/npapi/webplugin_delegate_proxy.cc

Issue 736743003: Use content::Referrer to pass around referrers in the plugin code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 6 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/renderer/npapi/webplugin_delegate_proxy.h" 5 #include "content/renderer/npapi/webplugin_delegate_proxy.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after
1114 return proxy; 1114 return proxy;
1115 } 1115 }
1116 1116
1117 void WebPluginDelegateProxy::FetchURL(unsigned long resource_id, 1117 void WebPluginDelegateProxy::FetchURL(unsigned long resource_id,
1118 int notify_id, 1118 int notify_id,
1119 const GURL& url, 1119 const GURL& url,
1120 const GURL& first_party_for_cookies, 1120 const GURL& first_party_for_cookies,
1121 const std::string& method, 1121 const std::string& method,
1122 const char* buf, 1122 const char* buf,
1123 unsigned int len, 1123 unsigned int len,
1124 const GURL& referrer, 1124 const Referrer& referrer,
1125 bool notify_redirects, 1125 bool notify_redirects,
1126 bool is_plugin_src_load, 1126 bool is_plugin_src_load,
1127 int origin_pid, 1127 int origin_pid,
1128 int render_frame_id, 1128 int render_frame_id,
1129 int render_view_id) { 1129 int render_view_id) {
1130 PluginMsg_FetchURL_Params params; 1130 PluginMsg_FetchURL_Params params;
1131 params.resource_id = resource_id; 1131 params.resource_id = resource_id;
1132 params.notify_id = notify_id; 1132 params.notify_id = notify_id;
1133 params.url = url; 1133 params.url = url;
1134 params.first_party_for_cookies = first_party_for_cookies; 1134 params.first_party_for_cookies = first_party_for_cookies;
1135 params.method = method; 1135 params.method = method;
1136 if (len) { 1136 if (len) {
1137 params.post_data.resize(len); 1137 params.post_data.resize(len);
1138 memcpy(&params.post_data.front(), buf, len); 1138 memcpy(&params.post_data.front(), buf, len);
1139 } 1139 }
1140 params.referrer = referrer; 1140 params.referrer = referrer.url;
1141 params.referrer_policy = referrer.policy;
1141 params.notify_redirect = notify_redirects; 1142 params.notify_redirect = notify_redirects;
1142 params.is_plugin_src_load = is_plugin_src_load; 1143 params.is_plugin_src_load = is_plugin_src_load;
1143 params.render_frame_id = render_frame_id; 1144 params.render_frame_id = render_frame_id;
1144 Send(new PluginMsg_FetchURL(instance_id_, params)); 1145 Send(new PluginMsg_FetchURL(instance_id_, params));
1145 } 1146 }
1146 1147
1147 #if defined(OS_MACOSX) 1148 #if defined(OS_MACOSX)
1148 void WebPluginDelegateProxy::OnFocusChanged(bool focused) { 1149 void WebPluginDelegateProxy::OnFocusChanged(bool focused) {
1149 if (render_view_) 1150 if (render_view_)
1150 render_view_->PluginFocusChanged(focused, instance_id_); 1151 render_view_->PluginFocusChanged(focused, instance_id_);
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
1237 1238
1238 plugin_->URLRedirectResponse(allow, resource_id); 1239 plugin_->URLRedirectResponse(allow, resource_id);
1239 } 1240 }
1240 1241
1241 void WebPluginDelegateProxy::OnCheckIfRunInsecureContent(const GURL& url, 1242 void WebPluginDelegateProxy::OnCheckIfRunInsecureContent(const GURL& url,
1242 bool* result) { 1243 bool* result) {
1243 *result = plugin_->CheckIfRunInsecureContent(url); 1244 *result = plugin_->CheckIfRunInsecureContent(url);
1244 } 1245 }
1245 1246
1246 } // namespace content 1247 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/npapi/webplugin_delegate_proxy.h ('k') | content/renderer/npapi/webplugin_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698