OLD | NEW |
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/plugin/webplugin_proxy.h" | 5 #include "chrome/plugin/webplugin_proxy.h" |
6 | 6 |
7 #include "base/gfx/gdi_util.h" | 7 #include "base/gfx/gdi_util.h" |
8 #include "base/scoped_handle.h" | 8 #include "base/scoped_handle.h" |
9 #include "base/shared_memory.h" | 9 #include "base/shared_memory.h" |
10 #include "base/singleton.h" | 10 #include "base/singleton.h" |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 bool is_javascript_url, | 230 bool is_javascript_url, |
231 const char* target, unsigned int len, | 231 const char* target, unsigned int len, |
232 const char* buf, bool is_file_data, | 232 const char* buf, bool is_file_data, |
233 bool notify, const char* url, | 233 bool notify, const char* url, |
234 void* notify_data, bool popups_allowed) { | 234 void* notify_data, bool popups_allowed) { |
235 if (!url) { | 235 if (!url) { |
236 NOTREACHED(); | 236 NOTREACHED(); |
237 return; | 237 return; |
238 } | 238 } |
239 | 239 |
| 240 if (!target && (0 == _strcmpi(method, "GET"))) { |
| 241 // Please refer to https://bugzilla.mozilla.org/show_bug.cgi?id=366082 |
| 242 // for more details on this. |
| 243 if (delegate_->quirks() & |
| 244 WebPluginDelegateImpl::PLUGIN_QUIRK_BLOCK_NONSTANDARD_GETURL_REQUESTS) { |
| 245 GURL request_url(url); |
| 246 if (!request_url.SchemeIs("http") && !request_url.SchemeIs("https") && |
| 247 !request_url.SchemeIs("ftp")) { |
| 248 return; |
| 249 } |
| 250 } |
| 251 } |
| 252 |
240 PluginHostMsg_URLRequest_Params params; | 253 PluginHostMsg_URLRequest_Params params; |
241 params.method = method; | 254 params.method = method; |
242 params.is_javascript_url = is_javascript_url; | 255 params.is_javascript_url = is_javascript_url; |
243 if (target) | 256 if (target) |
244 params.target = std::string(target); | 257 params.target = std::string(target); |
245 | 258 |
246 if (len) { | 259 if (len) { |
247 params.buffer.resize(len); | 260 params.buffer.resize(len); |
248 memcpy(¶ms.buffer.front(), buf, len); | 261 memcpy(¶ms.buffer.front(), buf, len); |
249 } | 262 } |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 | 400 |
388 Send(new PluginHostMsg_InitiateHTTPRangeRequest(route_id_, url, | 401 Send(new PluginHostMsg_InitiateHTTPRangeRequest(route_id_, url, |
389 range_info, existing_stream, | 402 range_info, existing_stream, |
390 notify_needed, notify_data)); | 403 notify_needed, notify_data)); |
391 } | 404 } |
392 | 405 |
393 void WebPluginProxy::OnPaint(const gfx::Rect& damaged_rect) { | 406 void WebPluginProxy::OnPaint(const gfx::Rect& damaged_rect) { |
394 Paint(damaged_rect); | 407 Paint(damaged_rect); |
395 Send(new PluginHostMsg_InvalidateRect(route_id_, damaged_rect)); | 408 Send(new PluginHostMsg_InvalidateRect(route_id_, damaged_rect)); |
396 } | 409 } |
OLD | NEW |