| 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" |
| 11 #include "base/waitable_event.h" | 11 #include "base/waitable_event.h" |
| 12 #include "chrome/common/gfx/chrome_canvas.h" | 12 #include "chrome/common/gfx/chrome_canvas.h" |
| 13 #include "chrome/common/plugin_messages.h" | 13 #include "chrome/common/plugin_messages.h" |
| 14 #include "chrome/common/url_constants.h" |
| 14 #include "chrome/common/win_util.h" | 15 #include "chrome/common/win_util.h" |
| 15 #include "chrome/plugin/npobject_proxy.h" | 16 #include "chrome/plugin/npobject_proxy.h" |
| 16 #include "chrome/plugin/npobject_util.h" | 17 #include "chrome/plugin/npobject_util.h" |
| 17 #include "chrome/plugin/plugin_channel.h" | 18 #include "chrome/plugin/plugin_channel.h" |
| 18 #include "chrome/plugin/plugin_thread.h" | 19 #include "chrome/plugin/plugin_thread.h" |
| 19 #include "chrome/plugin/webplugin_delegate_stub.h" | 20 #include "chrome/plugin/webplugin_delegate_stub.h" |
| 20 #include "skia/ext/platform_device.h" | 21 #include "skia/ext/platform_device.h" |
| 21 #include "webkit/glue/webplugin_delegate.h" | 22 #include "webkit/glue/webplugin_delegate.h" |
| 22 | 23 |
| 23 typedef std::map<CPBrowsingContext, WebPluginProxy*> ContextMap; | 24 typedef std::map<CPBrowsingContext, WebPluginProxy*> ContextMap; |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 NOTREACHED(); | 266 NOTREACHED(); |
| 266 return; | 267 return; |
| 267 } | 268 } |
| 268 | 269 |
| 269 if (!target && (0 == _strcmpi(method, "GET"))) { | 270 if (!target && (0 == _strcmpi(method, "GET"))) { |
| 270 // Please refer to https://bugzilla.mozilla.org/show_bug.cgi?id=366082 | 271 // Please refer to https://bugzilla.mozilla.org/show_bug.cgi?id=366082 |
| 271 // for more details on this. | 272 // for more details on this. |
| 272 if (delegate_->GetQuirks() & | 273 if (delegate_->GetQuirks() & |
| 273 WebPluginDelegate::PLUGIN_QUIRK_BLOCK_NONSTANDARD_GETURL_REQUESTS) { | 274 WebPluginDelegate::PLUGIN_QUIRK_BLOCK_NONSTANDARD_GETURL_REQUESTS) { |
| 274 GURL request_url(url); | 275 GURL request_url(url); |
| 275 if (!request_url.SchemeIs("http") && !request_url.SchemeIs("https") && | 276 if (!request_url.SchemeIs(chrome::kHttpScheme) && |
| 276 !request_url.SchemeIs("ftp")) { | 277 !request_url.SchemeIs(chrome::kHttpsScheme) && |
| 278 !request_url.SchemeIs(chrome::kFtpScheme)) { |
| 277 return; | 279 return; |
| 278 } | 280 } |
| 279 } | 281 } |
| 280 } | 282 } |
| 281 | 283 |
| 282 PluginHostMsg_URLRequest_Params params; | 284 PluginHostMsg_URLRequest_Params params; |
| 283 params.method = method; | 285 params.method = method; |
| 284 params.is_javascript_url = is_javascript_url; | 286 params.is_javascript_url = is_javascript_url; |
| 285 if (target) | 287 if (target) |
| 286 params.target = std::string(target); | 288 params.target = std::string(target); |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 | 428 |
| 427 Send(new PluginHostMsg_InitiateHTTPRangeRequest(route_id_, url, | 429 Send(new PluginHostMsg_InitiateHTTPRangeRequest(route_id_, url, |
| 428 range_info, existing_stream, | 430 range_info, existing_stream, |
| 429 notify_needed, notify_data)); | 431 notify_needed, notify_data)); |
| 430 } | 432 } |
| 431 | 433 |
| 432 void WebPluginProxy::OnPaint(const gfx::Rect& damaged_rect) { | 434 void WebPluginProxy::OnPaint(const gfx::Rect& damaged_rect) { |
| 433 Paint(damaged_rect); | 435 Paint(damaged_rect); |
| 434 Send(new PluginHostMsg_InvalidateRect(route_id_, damaged_rect)); | 436 Send(new PluginHostMsg_InvalidateRect(route_id_, damaged_rect)); |
| 435 } | 437 } |
| OLD | NEW |