| 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 #ifndef CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_ | 5 #ifndef CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_ |
| 6 #define CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_ | 6 #define CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/platform_file.h" | 9 #include "base/platform_file.h" |
| 10 #include "base/process.h" |
| 10 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
| 11 #include "ipc/ipc_platform_file.h" | 12 #include "ipc/ipc_platform_file.h" |
| 12 #include "ppapi/c/pp_instance.h" | 13 #include "ppapi/c/pp_instance.h" |
| 13 #include "webkit/plugins/ppapi/plugin_delegate.h" | 14 #include "webkit/plugins/ppapi/plugin_delegate.h" |
| 14 | 15 |
| 15 class FilePath; | 16 class FilePath; |
| 16 | 17 |
| 17 namespace gfx { | 18 namespace gfx { |
| 18 class Point; | 19 class Point; |
| 19 } | 20 } |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 // module. |file_path| should identify the module. It is only used to report | 61 // module. |file_path| should identify the module. It is only used to report |
| 61 // failures to the renderer. | 62 // failures to the renderer. |
| 62 // Returns a host if the external module is proxied successfully, otherwise | 63 // Returns a host if the external module is proxied successfully, otherwise |
| 63 // returns NULL. | 64 // returns NULL. |
| 64 CONTENT_EXPORT static RendererPpapiHost* CreateExternalPluginModule( | 65 CONTENT_EXPORT static RendererPpapiHost* CreateExternalPluginModule( |
| 65 scoped_refptr<webkit::ppapi::PluginModule> plugin_module, | 66 scoped_refptr<webkit::ppapi::PluginModule> plugin_module, |
| 66 webkit::ppapi::PluginInstance* plugin_instance, | 67 webkit::ppapi::PluginInstance* plugin_instance, |
| 67 const FilePath& file_path, | 68 const FilePath& file_path, |
| 68 ppapi::PpapiPermissions permissions, | 69 ppapi::PpapiPermissions permissions, |
| 69 const IPC::ChannelHandle& channel_handle, | 70 const IPC::ChannelHandle& channel_handle, |
| 71 base::ProcessId plugin_pid, |
| 70 int plugin_child_id); | 72 int plugin_child_id); |
| 71 | 73 |
| 72 // Returns the RendererPpapiHost associated with the given PP_Instance, | 74 // Returns the RendererPpapiHost associated with the given PP_Instance, |
| 73 // or NULL if the instance is invalid. | 75 // or NULL if the instance is invalid. |
| 74 CONTENT_EXPORT static RendererPpapiHost* GetForPPInstance( | 76 CONTENT_EXPORT static RendererPpapiHost* GetForPPInstance( |
| 75 PP_Instance instance); | 77 PP_Instance instance); |
| 76 | 78 |
| 77 // Returns the PpapiHost object. | 79 // Returns the PpapiHost object. |
| 78 virtual ppapi::host::PpapiHost* GetPpapiHost() = 0; | 80 virtual ppapi::host::PpapiHost* GetPpapiHost() = 0; |
| 79 | 81 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 // Returns true if the plugin is running in process. | 136 // Returns true if the plugin is running in process. |
| 135 virtual bool IsRunningInProcess() const = 0; | 137 virtual bool IsRunningInProcess() const = 0; |
| 136 | 138 |
| 137 protected: | 139 protected: |
| 138 virtual ~RendererPpapiHost() {} | 140 virtual ~RendererPpapiHost() {} |
| 139 }; | 141 }; |
| 140 | 142 |
| 141 } // namespace content | 143 } // namespace content |
| 142 | 144 |
| 143 #endif // CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_ | 145 #endif // CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_ |
| OLD | NEW |