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/renderer/pepper/pepper_plugin_instance_impl.h" | 5 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bit_cast.h" | 10 #include "base/bit_cast.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 #include "ppapi/shared_impl/scoped_pp_resource.h" | 88 #include "ppapi/shared_impl/scoped_pp_resource.h" |
89 #include "ppapi/shared_impl/scoped_pp_var.h" | 89 #include "ppapi/shared_impl/scoped_pp_var.h" |
90 #include "ppapi/shared_impl/time_conversion.h" | 90 #include "ppapi/shared_impl/time_conversion.h" |
91 #include "ppapi/shared_impl/url_request_info_data.h" | 91 #include "ppapi/shared_impl/url_request_info_data.h" |
92 #include "ppapi/shared_impl/var.h" | 92 #include "ppapi/shared_impl/var.h" |
93 #include "ppapi/thunk/enter.h" | 93 #include "ppapi/thunk/enter.h" |
94 #include "ppapi/thunk/ppb_buffer_api.h" | 94 #include "ppapi/thunk/ppb_buffer_api.h" |
95 #include "printing/metafile_skia_wrapper.h" | 95 #include "printing/metafile_skia_wrapper.h" |
96 #include "printing/pdf_metafile_skia.h" | 96 #include "printing/pdf_metafile_skia.h" |
97 #include "skia/ext/platform_canvas.h" | 97 #include "skia/ext/platform_canvas.h" |
| 98 #include "third_party/WebKit/public/platform/URLConversion.h" |
98 #include "third_party/WebKit/public/platform/WebCursorInfo.h" | 99 #include "third_party/WebKit/public/platform/WebCursorInfo.h" |
99 #include "third_party/WebKit/public/platform/WebGamepads.h" | 100 #include "third_party/WebKit/public/platform/WebGamepads.h" |
100 #include "third_party/WebKit/public/platform/WebRect.h" | 101 #include "third_party/WebKit/public/platform/WebRect.h" |
101 #include "third_party/WebKit/public/platform/WebString.h" | 102 #include "third_party/WebKit/public/platform/WebString.h" |
102 #include "third_party/WebKit/public/platform/WebURL.h" | 103 #include "third_party/WebKit/public/platform/WebURL.h" |
103 #include "third_party/WebKit/public/platform/WebURLError.h" | 104 #include "third_party/WebKit/public/platform/WebURLError.h" |
104 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 105 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
105 #include "third_party/WebKit/public/web/WebBindings.h" | 106 #include "third_party/WebKit/public/web/WebBindings.h" |
106 #include "third_party/WebKit/public/web/WebCompositionUnderline.h" | 107 #include "third_party/WebKit/public/web/WebCompositionUnderline.h" |
107 #include "third_party/WebKit/public/web/WebDataSource.h" | 108 #include "third_party/WebKit/public/web/WebDataSource.h" |
(...skipping 2750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2858 if (!full_frame_) | 2859 if (!full_frame_) |
2859 return ppapi::PPB_URLUtil_Shared::GenerateURLReturn(document.url(), | 2860 return ppapi::PPB_URLUtil_Shared::GenerateURLReturn(document.url(), |
2860 components); | 2861 components); |
2861 WebLocalFrame* frame = document.frame(); | 2862 WebLocalFrame* frame = document.frame(); |
2862 if (!frame) | 2863 if (!frame) |
2863 return PP_MakeUndefined(); | 2864 return PP_MakeUndefined(); |
2864 const WebURLRequest& request = frame->dataSource()->originalRequest(); | 2865 const WebURLRequest& request = frame->dataSource()->originalRequest(); |
2865 WebString referer = request.httpHeaderField("Referer"); | 2866 WebString referer = request.httpHeaderField("Referer"); |
2866 if (referer.isEmpty()) | 2867 if (referer.isEmpty()) |
2867 return PP_MakeUndefined(); | 2868 return PP_MakeUndefined(); |
2868 return ppapi::PPB_URLUtil_Shared::GenerateURLReturn(GURL(referer), | 2869 return ppapi::PPB_URLUtil_Shared::GenerateURLReturn( |
2869 components); | 2870 blink::WebStringToGURL(referer), components); |
2870 } | 2871 } |
2871 | 2872 |
2872 PP_ExternalPluginResult PepperPluginInstanceImpl::ResetAsProxied( | 2873 PP_ExternalPluginResult PepperPluginInstanceImpl::ResetAsProxied( |
2873 scoped_refptr<PluginModule> module) { | 2874 scoped_refptr<PluginModule> module) { |
2874 // Save the original module and switch over to the new one now that this | 2875 // Save the original module and switch over to the new one now that this |
2875 // plugin is using the IPC-based proxy. | 2876 // plugin is using the IPC-based proxy. |
2876 original_module_ = module_; | 2877 original_module_ = module_; |
2877 module_ = module; | 2878 module_ = module; |
2878 | 2879 |
2879 // For NaCl instances, remember the NaCl plugin instance interface, so we | 2880 // For NaCl instances, remember the NaCl plugin instance interface, so we |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3292 | 3293 |
3293 void PepperPluginInstanceImpl::RecordFlashJavaScriptUse() { | 3294 void PepperPluginInstanceImpl::RecordFlashJavaScriptUse() { |
3294 if (initialized_ && !javascript_used_ && is_flash_plugin_) { | 3295 if (initialized_ && !javascript_used_ && is_flash_plugin_) { |
3295 javascript_used_ = true; | 3296 javascript_used_ = true; |
3296 RenderThread::Get()->RecordAction( | 3297 RenderThread::Get()->RecordAction( |
3297 base::UserMetricsAction("Flash.JavaScriptUsed")); | 3298 base::UserMetricsAction("Flash.JavaScriptUsed")); |
3298 } | 3299 } |
3299 } | 3300 } |
3300 | 3301 |
3301 } // namespace content | 3302 } // namespace content |
OLD | NEW |