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

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

Issue 5961004: Revert 69755 - Move the NPAPI files from webkit/glue/plugins to webkit/plugin... (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/plugins/npapi/webplugin_delegate_impl.h" 37 #include "webkit/glue/plugins/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 44 using webkit_glue::WebPluginResourceClient;
45 using webkit::npapi::WebPluginResourceClient;
46 #if defined(OS_MACOSX) 45 #if defined(OS_MACOSX)
47 using webkit::npapi::WebPluginAcceleratedSurface; 46 using webkit_glue::WebPluginAcceleratedSurface;
48 #endif 47 #endif
49 48
50 typedef std::map<CPBrowsingContext, WebPluginProxy*> ContextMap; 49 typedef std::map<CPBrowsingContext, WebPluginProxy*> ContextMap;
51 static base::LazyInstance<ContextMap> g_context_map(base::LINKER_INITIALIZED); 50 static base::LazyInstance<ContextMap> g_context_map(base::LINKER_INITIALIZED);
52 51
53 WebPluginProxy::WebPluginProxy( 52 WebPluginProxy::WebPluginProxy(
54 PluginChannel* channel, 53 PluginChannel* channel,
55 int route_id, 54 int route_id,
56 const GURL& page_url, 55 const GURL& page_url,
57 gfx::NativeViewId containing_window, 56 gfx::NativeViewId containing_window,
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 const char* target, 316 const char* target,
318 const char* buf, 317 const char* buf,
319 unsigned int len, 318 unsigned int len,
320 int notify_id, 319 int notify_id,
321 bool popups_allowed, 320 bool popups_allowed,
322 bool notify_redirects) { 321 bool notify_redirects) {
323 if (!target && (0 == base::strcasecmp(method, "GET"))) { 322 if (!target && (0 == base::strcasecmp(method, "GET"))) {
324 // Please refer to https://bugzilla.mozilla.org/show_bug.cgi?id=366082 323 // Please refer to https://bugzilla.mozilla.org/show_bug.cgi?id=366082
325 // for more details on this. 324 // for more details on this.
326 if (delegate_->GetQuirks() & 325 if (delegate_->GetQuirks() &
327 webkit::npapi::WebPluginDelegateImpl:: 326 WebPluginDelegateImpl::PLUGIN_QUIRK_BLOCK_NONSTANDARD_GETURL_REQUESTS) {
328 PLUGIN_QUIRK_BLOCK_NONSTANDARD_GETURL_REQUESTS) {
329 GURL request_url(url); 327 GURL request_url(url);
330 if (!request_url.SchemeIs(chrome::kHttpScheme) && 328 if (!request_url.SchemeIs(chrome::kHttpScheme) &&
331 !request_url.SchemeIs(chrome::kHttpsScheme) && 329 !request_url.SchemeIs(chrome::kHttpsScheme) &&
332 !request_url.SchemeIs(chrome::kFtpScheme)) { 330 !request_url.SchemeIs(chrome::kFtpScheme)) {
333 return; 331 return;
334 } 332 }
335 } 333 }
336 } 334 }
337 335
338 PluginHostMsg_URLRequest_Params params; 336 PluginHostMsg_URLRequest_Params params;
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 } else { 727 } else {
730 index++; 728 index++;
731 } 729 }
732 } 730 }
733 } 731 }
734 732
735 void WebPluginProxy::URLRedirectResponse(bool allow, int resource_id) { 733 void WebPluginProxy::URLRedirectResponse(bool allow, int resource_id) {
736 Send(new PluginHostMsg_URLRedirectResponse(route_id_, allow, resource_id)); 734 Send(new PluginHostMsg_URLRedirectResponse(route_id_, allow, resource_id));
737 } 735 }
738 736
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