OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/plugin/webplugin_proxy.h" | 5 #include "content/plugin/webplugin_proxy.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 | 8 |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/memory/scoped_handle.h" | 10 #include "base/memory/scoped_handle.h" |
11 #include "base/shared_memory.h" | 11 #include "base/shared_memory.h" |
12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
13 #include "content/common/content_client.h" | 13 #include "content/common/content_client.h" |
14 #include "content/common/plugin_messages.h" | 14 #include "content/common/plugin_messages.h" |
| 15 #include "content/common/url_constants.h" |
15 #include "content/plugin/npobject_proxy.h" | 16 #include "content/plugin/npobject_proxy.h" |
16 #include "content/plugin/npobject_util.h" | 17 #include "content/plugin/npobject_util.h" |
17 #include "content/plugin/plugin_channel.h" | 18 #include "content/plugin/plugin_channel.h" |
18 #include "content/plugin/plugin_thread.h" | 19 #include "content/plugin/plugin_thread.h" |
19 #include "skia/ext/platform_device.h" | 20 #include "skia/ext/platform_device.h" |
20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" | 21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" |
21 #include "ui/gfx/blit.h" | 22 #include "ui/gfx/blit.h" |
22 #include "ui/gfx/canvas.h" | 23 #include "ui/gfx/canvas.h" |
23 #include "webkit/plugins/npapi/webplugin_delegate_impl.h" | 24 #include "webkit/plugins/npapi/webplugin_delegate_impl.h" |
24 | 25 |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 int notify_id, | 283 int notify_id, |
283 bool popups_allowed, | 284 bool popups_allowed, |
284 bool notify_redirects) { | 285 bool notify_redirects) { |
285 if (!target && (0 == base::strcasecmp(method, "GET"))) { | 286 if (!target && (0 == base::strcasecmp(method, "GET"))) { |
286 // Please refer to https://bugzilla.mozilla.org/show_bug.cgi?id=366082 | 287 // Please refer to https://bugzilla.mozilla.org/show_bug.cgi?id=366082 |
287 // for more details on this. | 288 // for more details on this. |
288 if (delegate_->GetQuirks() & | 289 if (delegate_->GetQuirks() & |
289 webkit::npapi::WebPluginDelegateImpl:: | 290 webkit::npapi::WebPluginDelegateImpl:: |
290 PLUGIN_QUIRK_BLOCK_NONSTANDARD_GETURL_REQUESTS) { | 291 PLUGIN_QUIRK_BLOCK_NONSTANDARD_GETURL_REQUESTS) { |
291 GURL request_url(url); | 292 GURL request_url(url); |
292 if (!request_url.SchemeIs("http") && | 293 if (!request_url.SchemeIs(chrome::kHttpScheme) && |
293 !request_url.SchemeIs("https") && | 294 !request_url.SchemeIs(chrome::kHttpsScheme) && |
294 !request_url.SchemeIs("ftp")) { | 295 !request_url.SchemeIs(chrome::kFtpScheme)) { |
295 return; | 296 return; |
296 } | 297 } |
297 } | 298 } |
298 } | 299 } |
299 | 300 |
300 PluginHostMsg_URLRequest_Params params; | 301 PluginHostMsg_URLRequest_Params params; |
301 params.url = url; | 302 params.url = url; |
302 params.method = method; | 303 params.method = method; |
303 if (target) | 304 if (target) |
304 params.target = std::string(target); | 305 params.target = std::string(target); |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
647 resource_clients_.erase(index++); | 648 resource_clients_.erase(index++); |
648 } else { | 649 } else { |
649 index++; | 650 index++; |
650 } | 651 } |
651 } | 652 } |
652 } | 653 } |
653 | 654 |
654 void WebPluginProxy::URLRedirectResponse(bool allow, int resource_id) { | 655 void WebPluginProxy::URLRedirectResponse(bool allow, int resource_id) { |
655 Send(new PluginHostMsg_URLRedirectResponse(route_id_, allow, resource_id)); | 656 Send(new PluginHostMsg_URLRedirectResponse(route_id_, allow, resource_id)); |
656 } | 657 } |
OLD | NEW |