| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 | 8 |
| 9 #include "app/gfx/canvas.h" | 9 #include "app/gfx/canvas.h" |
| 10 #if defined(OS_WIN) | 10 #if defined(OS_WIN) |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 #include "chrome/common/plugin_messages.h" | 23 #include "chrome/common/plugin_messages.h" |
| 24 #include "chrome/common/url_constants.h" | 24 #include "chrome/common/url_constants.h" |
| 25 #include "chrome/plugin/npobject_proxy.h" | 25 #include "chrome/plugin/npobject_proxy.h" |
| 26 #include "chrome/plugin/npobject_util.h" | 26 #include "chrome/plugin/npobject_util.h" |
| 27 #include "chrome/plugin/plugin_channel.h" | 27 #include "chrome/plugin/plugin_channel.h" |
| 28 #include "chrome/plugin/plugin_thread.h" | 28 #include "chrome/plugin/plugin_thread.h" |
| 29 #include "chrome/plugin/webplugin_delegate_stub.h" | 29 #include "chrome/plugin/webplugin_delegate_stub.h" |
| 30 #include "skia/ext/platform_device.h" | 30 #include "skia/ext/platform_device.h" |
| 31 #include "webkit/api/public/WebBindings.h" | 31 #include "webkit/api/public/WebBindings.h" |
| 32 #include "webkit/glue/plugins/webplugin_delegate_impl.h" | 32 #include "webkit/glue/plugins/webplugin_delegate_impl.h" |
| 33 #include "webkit/glue/webplugin_delegate.h" | |
| 34 | 33 |
| 35 #if defined(OS_WIN) | 34 #if defined(OS_WIN) |
| 36 #include "base/gfx/gdi_util.h" | 35 #include "base/gfx/gdi_util.h" |
| 37 #endif | 36 #endif |
| 38 | 37 |
| 39 using WebKit::WebBindings; | 38 using WebKit::WebBindings; |
| 40 using webkit_glue::WebPluginDelegate; | |
| 41 using webkit_glue::WebPluginResourceClient; | 39 using webkit_glue::WebPluginResourceClient; |
| 42 | 40 |
| 43 typedef std::map<CPBrowsingContext, WebPluginProxy*> ContextMap; | 41 typedef std::map<CPBrowsingContext, WebPluginProxy*> ContextMap; |
| 44 static ContextMap& GetContextMap() { | 42 static ContextMap& GetContextMap() { |
| 45 return *Singleton<ContextMap>::get(); | 43 return *Singleton<ContextMap>::get(); |
| 46 } | 44 } |
| 47 | 45 |
| 48 WebPluginProxy::WebPluginProxy( | 46 WebPluginProxy::WebPluginProxy( |
| 49 PluginChannel* channel, | 47 PluginChannel* channel, |
| 50 int route_id, | 48 int route_id, |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 bool popups_allowed) { | 301 bool popups_allowed) { |
| 304 if (!url) { | 302 if (!url) { |
| 305 NOTREACHED(); | 303 NOTREACHED(); |
| 306 return; | 304 return; |
| 307 } | 305 } |
| 308 | 306 |
| 309 if (!target && (0 == base::strcasecmp(method, "GET"))) { | 307 if (!target && (0 == base::strcasecmp(method, "GET"))) { |
| 310 // Please refer to https://bugzilla.mozilla.org/show_bug.cgi?id=366082 | 308 // Please refer to https://bugzilla.mozilla.org/show_bug.cgi?id=366082 |
| 311 // for more details on this. | 309 // for more details on this. |
| 312 if (delegate_->GetQuirks() & | 310 if (delegate_->GetQuirks() & |
| 313 WebPluginDelegate::PLUGIN_QUIRK_BLOCK_NONSTANDARD_GETURL_REQUESTS) { | 311 WebPluginDelegateImpl::PLUGIN_QUIRK_BLOCK_NONSTANDARD_GETURL_REQUESTS) { |
| 314 GURL request_url(url); | 312 GURL request_url(url); |
| 315 if (!request_url.SchemeIs(chrome::kHttpScheme) && | 313 if (!request_url.SchemeIs(chrome::kHttpScheme) && |
| 316 !request_url.SchemeIs(chrome::kHttpsScheme) && | 314 !request_url.SchemeIs(chrome::kHttpsScheme) && |
| 317 !request_url.SchemeIs(chrome::kFtpScheme)) { | 315 !request_url.SchemeIs(chrome::kFtpScheme)) { |
| 318 return; | 316 return; |
| 319 } | 317 } |
| 320 } | 318 } |
| 321 } | 319 } |
| 322 | 320 |
| 323 PluginHostMsg_URLRequest_Params params; | 321 PluginHostMsg_URLRequest_Params params; |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 654 while (index != resource_clients_.end()) { | 652 while (index != resource_clients_.end()) { |
| 655 WebPluginResourceClient* client = (*index).second; | 653 WebPluginResourceClient* client = (*index).second; |
| 656 | 654 |
| 657 if (client == resource_client) { | 655 if (client == resource_client) { |
| 658 resource_clients_.erase(index++); | 656 resource_clients_.erase(index++); |
| 659 } else { | 657 } else { |
| 660 index++; | 658 index++; |
| 661 } | 659 } |
| 662 } | 660 } |
| 663 } | 661 } |
| OLD | NEW |