| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "ppapi/proxy/ppb_flash_proxy.h" | 5 #include "ppapi/proxy/ppb_flash_proxy.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "ppapi/c/dev/pp_file_info_dev.h" | 9 #include "ppapi/c/dev/pp_file_info_dev.h" |
| 10 #include "ppapi/c/dev/ppb_font_dev.h" | 10 #include "ppapi/c/dev/ppb_font_dev.h" |
| 11 #include "ppapi/c/pp_completion_callback.h" | 11 #include "ppapi/c/pp_completion_callback.h" |
| 12 #include "ppapi/c/pp_errors.h" | 12 #include "ppapi/c/pp_errors.h" |
| 13 #include "ppapi/c/pp_resource.h" | 13 #include "ppapi/c/pp_resource.h" |
| 14 #include "ppapi/proxy/plugin_dispatcher.h" | 14 #include "ppapi/proxy/plugin_dispatcher.h" |
| 15 #include "ppapi/proxy/plugin_resource.h" | 15 #include "ppapi/proxy/plugin_resource.h" |
| 16 #include "ppapi/proxy/ppapi_messages.h" | 16 #include "ppapi/proxy/ppapi_messages.h" |
| 17 #include "ppapi/proxy/serialized_var.h" | 17 #include "ppapi/proxy/serialized_var.h" |
| 18 #include "webkit/glue/plugins/ppb_private2.h" | 18 #include "webkit/plugins/ppapi/ppb_flash.h" |
| 19 | 19 |
| 20 namespace pp { | 20 namespace pp { |
| 21 namespace proxy { | 21 namespace proxy { |
| 22 | 22 |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| 25 // Given an error code and a handle result from a Pepper API call, converts | 25 // Given an error code and a handle result from a Pepper API call, converts |
| 26 // to a PlatformFileForTransit, possibly also updating the error value if | 26 // to a PlatformFileForTransit, possibly also updating the error value if |
| 27 // an error occurred. | 27 // an error occurred. |
| 28 IPC::PlatformFileForTransit PlatformFileToPlatformFileForTransit( | 28 IPC::PlatformFileForTransit PlatformFileToPlatformFileForTransit( |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 bool NavigateToURL(PP_Instance pp_instance, | 185 bool NavigateToURL(PP_Instance pp_instance, |
| 186 const char* url, | 186 const char* url, |
| 187 const char* target) { | 187 const char* target) { |
| 188 bool result = false; | 188 bool result = false; |
| 189 PluginDispatcher::Get()->Send( | 189 PluginDispatcher::Get()->Send( |
| 190 new PpapiHostMsg_PPBFlash_NavigateToURL( | 190 new PpapiHostMsg_PPBFlash_NavigateToURL( |
| 191 INTERFACE_ID_PPB_FLASH, pp_instance, url, target, &result)); | 191 INTERFACE_ID_PPB_FLASH, pp_instance, url, target, &result)); |
| 192 return result; | 192 return result; |
| 193 } | 193 } |
| 194 | 194 |
| 195 const PPB_Private2 ppb_flash = { | 195 const PPB_Flash ppb_flash = { |
| 196 &SetInstanceAlwaysOnTop, | 196 &SetInstanceAlwaysOnTop, |
| 197 &DrawGlyphs, | 197 &DrawGlyphs, |
| 198 &GetProxyForURL, | 198 &GetProxyForURL, |
| 199 &OpenModuleLocalFile, | 199 &OpenModuleLocalFile, |
| 200 &RenameModuleLocalFile, | 200 &RenameModuleLocalFile, |
| 201 &DeleteModuleLocalFileOrDir, | 201 &DeleteModuleLocalFileOrDir, |
| 202 &CreateModuleLocalDir, | 202 &CreateModuleLocalDir, |
| 203 &QueryModuleLocalFile, | 203 &QueryModuleLocalFile, |
| 204 &GetModuleLocalDirContents, | 204 &GetModuleLocalDirContents, |
| 205 &FreeModuleLocalDirContents, | 205 &FreeModuleLocalDirContents, |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 void PPB_Flash_Proxy::OnMsgNavigateToURL(PP_Instance instance, | 350 void PPB_Flash_Proxy::OnMsgNavigateToURL(PP_Instance instance, |
| 351 const std::string& url, | 351 const std::string& url, |
| 352 const std::string& target, | 352 const std::string& target, |
| 353 bool* result) { | 353 bool* result) { |
| 354 *result = ppb_flash_target()->NavigateToURL(instance, url.c_str(), | 354 *result = ppb_flash_target()->NavigateToURL(instance, url.c_str(), |
| 355 target.c_str()); | 355 target.c_str()); |
| 356 } | 356 } |
| 357 | 357 |
| 358 } // namespace proxy | 358 } // namespace proxy |
| 359 } // namespace pp | 359 } // namespace pp |
| OLD | NEW |