| 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" | |
| 23 #include "skia/ext/platform_canvas.h" | 22 #include "skia/ext/platform_canvas.h" |
| 24 #include "skia/ext/platform_device.h" | 23 #include "skia/ext/platform_device.h" |
| 25 #include "third_party/WebKit/public/web/WebBindings.h" | 24 #include "third_party/WebKit/public/web/WebBindings.h" |
| 26 #include "ui/gfx/blit.h" | 25 #include "ui/gfx/blit.h" |
| 27 #include "ui/gfx/canvas.h" | 26 #include "ui/gfx/canvas.h" |
| 27 #include "url/url_constants.h" |
| 28 | 28 |
| 29 #if defined(OS_MACOSX) | 29 #if defined(OS_MACOSX) |
| 30 #include "base/mac/mac_util.h" | 30 #include "base/mac/mac_util.h" |
| 31 #include "base/mac/scoped_cftyperef.h" | 31 #include "base/mac/scoped_cftyperef.h" |
| 32 #include "content/plugin/webplugin_accelerated_surface_proxy_mac.h" | 32 #include "content/plugin/webplugin_accelerated_surface_proxy_mac.h" |
| 33 #endif | 33 #endif |
| 34 | 34 |
| 35 #if defined(OS_WIN) | 35 #if defined(OS_WIN) |
| 36 #include "content/common/plugin_process_messages.h" | 36 #include "content/common/plugin_process_messages.h" |
| 37 #include "content/public/common/sandbox_init.h" | 37 #include "content/public/common/sandbox_init.h" |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 bool popups_allowed, | 283 bool popups_allowed, |
| 284 bool notify_redirects) { | 284 bool notify_redirects) { |
| 285 if (!target && (0 == base::strcasecmp(method, "GET"))) { | 285 if (!target && (0 == base::strcasecmp(method, "GET"))) { |
| 286 // Please refer to https://bugzilla.mozilla.org/show_bug.cgi?id=366082 | 286 // Please refer to https://bugzilla.mozilla.org/show_bug.cgi?id=366082 |
| 287 // for more details on this. | 287 // for more details on this. |
| 288 if (delegate_->GetQuirks() & | 288 if (delegate_->GetQuirks() & |
| 289 WebPluginDelegateImpl::PLUGIN_QUIRK_BLOCK_NONSTANDARD_GETURL_REQUESTS) { | 289 WebPluginDelegateImpl::PLUGIN_QUIRK_BLOCK_NONSTANDARD_GETURL_REQUESTS) { |
| 290 GURL request_url(url); | 290 GURL request_url(url); |
| 291 if (!request_url.SchemeIs(url::kHttpScheme) && | 291 if (!request_url.SchemeIs(url::kHttpScheme) && |
| 292 !request_url.SchemeIs(url::kHttpsScheme) && | 292 !request_url.SchemeIs(url::kHttpsScheme) && |
| 293 !request_url.SchemeIs(kFtpScheme)) { | 293 !request_url.SchemeIs(url::kFtpScheme)) { |
| 294 return; | 294 return; |
| 295 } | 295 } |
| 296 } | 296 } |
| 297 } | 297 } |
| 298 | 298 |
| 299 PluginHostMsg_URLRequest_Params params; | 299 PluginHostMsg_URLRequest_Params params; |
| 300 params.url = url; | 300 params.url = url; |
| 301 params.method = method; | 301 params.method = method; |
| 302 if (target) | 302 if (target) |
| 303 params.target = std::string(target); | 303 params.target = std::string(target); |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 int input_type; | 611 int input_type; |
| 612 gfx::Rect caret_rect; | 612 gfx::Rect caret_rect; |
| 613 if (!delegate_->GetIMEStatus(&input_type, &caret_rect)) | 613 if (!delegate_->GetIMEStatus(&input_type, &caret_rect)) |
| 614 return; | 614 return; |
| 615 | 615 |
| 616 Send(new PluginHostMsg_NotifyIMEStatus(route_id_, input_type, caret_rect)); | 616 Send(new PluginHostMsg_NotifyIMEStatus(route_id_, input_type, caret_rect)); |
| 617 } | 617 } |
| 618 #endif | 618 #endif |
| 619 | 619 |
| 620 } // namespace content | 620 } // namespace content |
| OLD | NEW |