| OLD | NEW |
| 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/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/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| 11 #include "base/memory/scoped_handle.h" | 11 #include "base/memory/scoped_handle.h" |
| 12 #include "base/memory/shared_memory.h" | 12 #include "base/memory/shared_memory.h" |
| 13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
| 14 #include "content/child/npapi/npobject_proxy.h" | 14 #include "content/child/npapi/npobject_proxy.h" |
| 15 #include "content/child/npapi/npobject_util.h" | 15 #include "content/child/npapi/npobject_util.h" |
| 16 #include "content/child/npapi/webplugin_delegate_impl.h" | 16 #include "content/child/npapi/webplugin_delegate_impl.h" |
| 17 #include "content/child/npapi/webplugin_resource_client.h" | 17 #include "content/child/npapi/webplugin_resource_client.h" |
| 18 #include "content/child/plugin_messages.h" | 18 #include "content/child/plugin_messages.h" |
| 19 #include "content/plugin/plugin_channel.h" | 19 #include "content/plugin/plugin_channel.h" |
| 20 #include "content/plugin/plugin_thread.h" | 20 #include "content/plugin/plugin_thread.h" |
| 21 #include "content/public/common/content_client.h" | 21 #include "content/public/common/content_client.h" |
| 22 #include "content/public/common/url_constants.h" | 22 #include "content/public/common/url_constants.h" |
| 23 #include "skia/ext/platform_canvas.h" | 23 #include "skia/ext/platform_canvas.h" |
| 24 #include "skia/ext/platform_device.h" | 24 #include "skia/ext/platform_device.h" |
| 25 #include "third_party/WebKit/public/web/WebBindings.h" | 25 #include "third_party/WebKit/public/web/WebBindings.h" |
| 26 #include "ui/gfx/blit.h" | 26 #include "ui/gfx/blit.h" |
| 27 #include "ui/gfx/canvas.h" | 27 #include "ui/gfx/canvas.h" |
| 28 #include "url/url_constants.h" |
| 28 | 29 |
| 29 #if defined(OS_MACOSX) | 30 #if defined(OS_MACOSX) |
| 30 #include "base/mac/mac_util.h" | 31 #include "base/mac/mac_util.h" |
| 31 #include "base/mac/scoped_cftyperef.h" | 32 #include "base/mac/scoped_cftyperef.h" |
| 32 #include "content/plugin/webplugin_accelerated_surface_proxy_mac.h" | 33 #include "content/plugin/webplugin_accelerated_surface_proxy_mac.h" |
| 33 #endif | 34 #endif |
| 34 | 35 |
| 35 #if defined(OS_WIN) | 36 #if defined(OS_WIN) |
| 36 #include "content/common/plugin_process_messages.h" | 37 #include "content/common/plugin_process_messages.h" |
| 37 #include "content/public/common/sandbox_init.h" | 38 #include "content/public/common/sandbox_init.h" |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 unsigned int len, | 282 unsigned int len, |
| 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 WebPluginDelegateImpl::PLUGIN_QUIRK_BLOCK_NONSTANDARD_GETURL_REQUESTS) { | 290 WebPluginDelegateImpl::PLUGIN_QUIRK_BLOCK_NONSTANDARD_GETURL_REQUESTS) { |
| 290 GURL request_url(url); | 291 GURL request_url(url); |
| 291 if (!request_url.SchemeIs(kHttpScheme) && | 292 if (!request_url.SchemeIs(url::kHttpScheme) && |
| 292 !request_url.SchemeIs(kHttpsScheme) && | 293 !request_url.SchemeIs(url::kHttpsScheme) && |
| 293 !request_url.SchemeIs(kFtpScheme)) { | 294 !request_url.SchemeIs(kFtpScheme)) { |
| 294 return; | 295 return; |
| 295 } | 296 } |
| 296 } | 297 } |
| 297 } | 298 } |
| 298 | 299 |
| 299 PluginHostMsg_URLRequest_Params params; | 300 PluginHostMsg_URLRequest_Params params; |
| 300 params.url = url; | 301 params.url = url; |
| 301 params.method = method; | 302 params.method = method; |
| 302 if (target) | 303 if (target) |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 int input_type; | 612 int input_type; |
| 612 gfx::Rect caret_rect; | 613 gfx::Rect caret_rect; |
| 613 if (!delegate_->GetIMEStatus(&input_type, &caret_rect)) | 614 if (!delegate_->GetIMEStatus(&input_type, &caret_rect)) |
| 614 return; | 615 return; |
| 615 | 616 |
| 616 Send(new PluginHostMsg_NotifyIMEStatus(route_id_, input_type, caret_rect)); | 617 Send(new PluginHostMsg_NotifyIMEStatus(route_id_, input_type, caret_rect)); |
| 617 } | 618 } |
| 618 #endif | 619 #endif |
| 619 | 620 |
| 620 } // namespace content | 621 } // namespace content |
| OLD | NEW |