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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 3098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3109 WebString result = container_->executeScriptURL(gurl, false); | 3109 WebString result = container_->executeScriptURL(gurl, false); |
3110 return result.isNull() ? PP_ERROR_FAILED : PP_OK; | 3110 return result.isNull() ? PP_ERROR_FAILED : PP_OK; |
3111 } | 3111 } |
3112 | 3112 |
3113 // Only GETs and POSTs are supported. | 3113 // Only GETs and POSTs are supported. |
3114 if (web_request.httpMethod() != "GET" && web_request.httpMethod() != "POST") | 3114 if (web_request.httpMethod() != "GET" && web_request.httpMethod() != "POST") |
3115 return PP_ERROR_BADARGUMENT; | 3115 return PP_ERROR_BADARGUMENT; |
3116 | 3116 |
3117 WebString target_str = WebString::fromUTF8(target); | 3117 WebString target_str = WebString::fromUTF8(target); |
3118 blink::WebScopedUserGesture user_gesture(CurrentUserGestureToken()); | 3118 blink::WebScopedUserGesture user_gesture(CurrentUserGestureToken()); |
3119 container_->loadFrameRequest(web_request, target_str, false, NULL); | 3119 container_->loadFrameRequest(web_request, target_str); |
3120 return PP_OK; | 3120 return PP_OK; |
3121 } | 3121 } |
3122 | 3122 |
3123 int PepperPluginInstanceImpl::MakePendingFileRefRendererHost( | 3123 int PepperPluginInstanceImpl::MakePendingFileRefRendererHost( |
3124 const base::FilePath& path) { | 3124 const base::FilePath& path) { |
3125 RendererPpapiHostImpl* host_impl = module_->renderer_ppapi_host(); | 3125 RendererPpapiHostImpl* host_impl = module_->renderer_ppapi_host(); |
3126 PepperFileRefRendererHost* file_ref_host( | 3126 PepperFileRefRendererHost* file_ref_host( |
3127 new PepperFileRefRendererHost(host_impl, pp_instance(), 0, path)); | 3127 new PepperFileRefRendererHost(host_impl, pp_instance(), 0, path)); |
3128 return host_impl->GetPpapiHost()->AddPendingResourceHost( | 3128 return host_impl->GetPpapiHost()->AddPendingResourceHost( |
3129 scoped_ptr<ppapi::host::ResourceHost>(file_ref_host)); | 3129 scoped_ptr<ppapi::host::ResourceHost>(file_ref_host)); |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3274 | 3274 |
3275 void PepperPluginInstanceImpl::RecordFlashJavaScriptUse() { | 3275 void PepperPluginInstanceImpl::RecordFlashJavaScriptUse() { |
3276 if (initialized_ && !javascript_used_ && is_flash_plugin_) { | 3276 if (initialized_ && !javascript_used_ && is_flash_plugin_) { |
3277 javascript_used_ = true; | 3277 javascript_used_ = true; |
3278 RenderThread::Get()->RecordAction( | 3278 RenderThread::Get()->RecordAction( |
3279 base::UserMetricsAction("Flash.JavaScriptUsed")); | 3279 base::UserMetricsAction("Flash.JavaScriptUsed")); |
3280 } | 3280 } |
3281 } | 3281 } |
3282 | 3282 |
3283 } // namespace content | 3283 } // namespace content |
OLD | NEW |