Chromium Code Reviews| Index: webkit/plugins/ppapi/ppb_flash_impl.cc |
| diff --git a/webkit/plugins/ppapi/ppb_flash_impl.cc b/webkit/plugins/ppapi/ppb_flash_impl.cc |
| index 930b54ed7245a21fba6d8e2e50ab1d2cda6ecd78..cacd29bfce2ce81616f7fb70b6cd97594c37610d 100644 |
| --- a/webkit/plugins/ppapi/ppb_flash_impl.cc |
| +++ b/webkit/plugins/ppapi/ppb_flash_impl.cc |
| @@ -12,6 +12,7 @@ |
| #include "webkit/plugins/ppapi/common.h" |
| #include "webkit/plugins/ppapi/plugin_delegate.h" |
| #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" |
| +#include "webkit/plugins/ppapi/ppb_url_request_info_impl.h" |
| #include "webkit/plugins/ppapi/resource_tracker.h" |
| #include "webkit/plugins/ppapi/var.h" |
| @@ -42,13 +43,22 @@ PP_Var GetProxyForURL(PP_Instance pp_instance, const char* url) { |
| return StringVar::StringToPPVar(instance->module(), proxy_host); |
| } |
| -PP_Bool NavigateToURL(PP_Instance pp_instance, |
| - const char* url, |
| - const char* target) { |
| - PluginInstance* instance = ResourceTracker::Get()->GetInstance(pp_instance); |
| +int32_t Navigate(PP_Resource request_id, |
| + const char* target, |
| + bool from_user_action) { |
| + scoped_refptr<PPB_URLRequestInfo_Impl> request( |
| + Resource::GetAs<PPB_URLRequestInfo_Impl>(request_id)); |
| + if (!request) |
| + return PP_ERROR_BADRESOURCE; |
| + |
| + if (!target) |
| + return PP_ERROR_BADARGUMENT; |
| + |
| + PluginInstance* instance = request->instance(); |
| if (!instance) |
| - return PP_FALSE; |
| - return BoolToPPBool(instance->NavigateToURL(url, target)); |
| + return PP_ERROR_FAILED; |
| + |
| + return BoolToPPBool(instance->Navigate(request, target, from_user_action)); |
|
piman
2011/03/25 22:07:30
remove BoolToPPBool
|
| } |
| void RunMessageLoop(PP_Instance instance) { |
| @@ -66,7 +76,7 @@ const PPB_Flash ppb_flash = { |
| &SetInstanceAlwaysOnTop, |
| &PPB_Flash_Impl::DrawGlyphs, |
| &GetProxyForURL, |
| - &NavigateToURL, |
| + &Navigate, |
| &RunMessageLoop, |
| &QuitMessageLoop, |
| }; |