Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(273)

Side by Side Diff: chrome/plugin/webplugin_proxy.cc

Issue 5996003: Revert "Revert 69755 - Move the NPAPI files from webkit/glue/plugins to webkit/plugins/npapi" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/plugin/webplugin_proxy.h ('k') | chrome/renderer/blocked_plugin.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #if defined(OS_WIN) 9 #if defined(OS_WIN)
10 #include "app/win_util.h" 10 #include "app/win_util.h"
(...skipping 16 matching lines...) Expand all
27 #if defined(OS_MACOSX) 27 #if defined(OS_MACOSX)
28 #include "chrome/plugin/webplugin_accelerated_surface_proxy_mac.h" 28 #include "chrome/plugin/webplugin_accelerated_surface_proxy_mac.h"
29 #endif 29 #endif
30 #include "gfx/blit.h" 30 #include "gfx/blit.h"
31 #include "gfx/canvas.h" 31 #include "gfx/canvas.h"
32 #if defined(OS_WIN) 32 #if defined(OS_WIN)
33 #include "gfx/gdi_util.h" 33 #include "gfx/gdi_util.h"
34 #endif 34 #endif
35 #include "skia/ext/platform_device.h" 35 #include "skia/ext/platform_device.h"
36 #include "third_party/WebKit/WebKit/chromium/public/WebBindings.h" 36 #include "third_party/WebKit/WebKit/chromium/public/WebBindings.h"
37 #include "webkit/glue/plugins/webplugin_delegate_impl.h" 37 #include "webkit/plugins/npapi/webplugin_delegate_impl.h"
38 38
39 #if defined(USE_X11) 39 #if defined(USE_X11)
40 #include "app/x11_util_internal.h" 40 #include "app/x11_util_internal.h"
41 #endif 41 #endif
42 42
43 using WebKit::WebBindings; 43 using WebKit::WebBindings;
44 using webkit_glue::WebPluginResourceClient; 44
45 using webkit::npapi::WebPluginResourceClient;
45 #if defined(OS_MACOSX) 46 #if defined(OS_MACOSX)
46 using webkit_glue::WebPluginAcceleratedSurface; 47 using webkit::npapi::WebPluginAcceleratedSurface;
47 #endif 48 #endif
48 49
49 typedef std::map<CPBrowsingContext, WebPluginProxy*> ContextMap; 50 typedef std::map<CPBrowsingContext, WebPluginProxy*> ContextMap;
50 static base::LazyInstance<ContextMap> g_context_map(base::LINKER_INITIALIZED); 51 static base::LazyInstance<ContextMap> g_context_map(base::LINKER_INITIALIZED);
51 52
52 WebPluginProxy::WebPluginProxy( 53 WebPluginProxy::WebPluginProxy(
53 PluginChannel* channel, 54 PluginChannel* channel,
54 int route_id, 55 int route_id,
55 const GURL& page_url, 56 const GURL& page_url,
56 gfx::NativeViewId containing_window, 57 gfx::NativeViewId containing_window,
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 const char* target, 317 const char* target,
317 const char* buf, 318 const char* buf,
318 unsigned int len, 319 unsigned int len,
319 int notify_id, 320 int notify_id,
320 bool popups_allowed, 321 bool popups_allowed,
321 bool notify_redirects) { 322 bool notify_redirects) {
322 if (!target && (0 == base::strcasecmp(method, "GET"))) { 323 if (!target && (0 == base::strcasecmp(method, "GET"))) {
323 // Please refer to https://bugzilla.mozilla.org/show_bug.cgi?id=366082 324 // Please refer to https://bugzilla.mozilla.org/show_bug.cgi?id=366082
324 // for more details on this. 325 // for more details on this.
325 if (delegate_->GetQuirks() & 326 if (delegate_->GetQuirks() &
326 WebPluginDelegateImpl::PLUGIN_QUIRK_BLOCK_NONSTANDARD_GETURL_REQUESTS) { 327 webkit::npapi::WebPluginDelegateImpl::
328 PLUGIN_QUIRK_BLOCK_NONSTANDARD_GETURL_REQUESTS) {
327 GURL request_url(url); 329 GURL request_url(url);
328 if (!request_url.SchemeIs(chrome::kHttpScheme) && 330 if (!request_url.SchemeIs(chrome::kHttpScheme) &&
329 !request_url.SchemeIs(chrome::kHttpsScheme) && 331 !request_url.SchemeIs(chrome::kHttpsScheme) &&
330 !request_url.SchemeIs(chrome::kFtpScheme)) { 332 !request_url.SchemeIs(chrome::kFtpScheme)) {
331 return; 333 return;
332 } 334 }
333 } 335 }
334 } 336 }
335 337
336 PluginHostMsg_URLRequest_Params params; 338 PluginHostMsg_URLRequest_Params params;
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 } else { 729 } else {
728 index++; 730 index++;
729 } 731 }
730 } 732 }
731 } 733 }
732 734
733 void WebPluginProxy::URLRedirectResponse(bool allow, int resource_id) { 735 void WebPluginProxy::URLRedirectResponse(bool allow, int resource_id) {
734 Send(new PluginHostMsg_URLRedirectResponse(route_id_, allow, resource_id)); 736 Send(new PluginHostMsg_URLRedirectResponse(route_id_, allow, resource_id));
735 } 737 }
736 738
OLDNEW
« no previous file with comments | « chrome/plugin/webplugin_proxy.h ('k') | chrome/renderer/blocked_plugin.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698