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_RENDERER_PEPPER_RENDERER_PPAPI_HOST_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_RENDERER_PPAPI_HOST_IMPL_H_ |
6 #define CONTENT_RENDERER_PEPPER_RENDERER_PPAPI_HOST_IMPL_H_ | 6 #define CONTENT_RENDERER_PEPPER_RENDERER_PPAPI_HOST_IMPL_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "content/public/renderer/renderer_ppapi_host.h" | 10 #include "content/public/renderer/renderer_ppapi_host.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 // The module will take ownership of the new host impl. The returned value | 54 // The module will take ownership of the new host impl. The returned value |
55 // does not pass ownership, it's just for the information of the caller. | 55 // does not pass ownership, it's just for the information of the caller. |
56 static RendererPpapiHostImpl* CreateOnModuleForOutOfProcess( | 56 static RendererPpapiHostImpl* CreateOnModuleForOutOfProcess( |
57 webkit::ppapi::PluginModule* module, | 57 webkit::ppapi::PluginModule* module, |
58 ppapi::proxy::HostDispatcher* dispatcher, | 58 ppapi::proxy::HostDispatcher* dispatcher, |
59 const ppapi::PpapiPermissions& permissions); | 59 const ppapi::PpapiPermissions& permissions); |
60 static RendererPpapiHostImpl* CreateOnModuleForInProcess( | 60 static RendererPpapiHostImpl* CreateOnModuleForInProcess( |
61 webkit::ppapi::PluginModule* module, | 61 webkit::ppapi::PluginModule* module, |
62 const ppapi::PpapiPermissions& permissions); | 62 const ppapi::PpapiPermissions& permissions); |
63 | 63 |
| 64 // Returns the RendererPpapiHostImpl associated with the given PP_Instance, |
| 65 // or NULL if the instance is invalid. |
| 66 static RendererPpapiHostImpl* GetForPPInstance(PP_Instance pp_instance); |
| 67 |
64 // Returns the router that we use for in-process IPC emulation (see the | 68 // Returns the router that we use for in-process IPC emulation (see the |
65 // pepper_in_process_router.h for more). This will be NULL when the plugin | 69 // pepper_in_process_router.h for more). This will be NULL when the plugin |
66 // is running out-of-process. | 70 // is running out-of-process. |
67 PepperInProcessRouter* in_process_router() { | 71 PepperInProcessRouter* in_process_router() { |
68 return in_process_router_.get(); | 72 return in_process_router_.get(); |
69 } | 73 } |
70 | 74 |
71 // Creates the in-process resource creation API wrapper for the given | 75 // Creates the in-process resource creation API wrapper for the given |
72 // plugin instance. This object will reference the host impl, so the | 76 // plugin instance. This object will reference the host impl, so the |
73 // host impl should outlive the returned pointer. Since the resource | 77 // host impl should outlive the returned pointer. Since the resource |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 | 110 |
107 // Null when running out-of-process. | 111 // Null when running out-of-process. |
108 scoped_ptr<PepperInProcessRouter> in_process_router_; | 112 scoped_ptr<PepperInProcessRouter> in_process_router_; |
109 | 113 |
110 DISALLOW_COPY_AND_ASSIGN(RendererPpapiHostImpl); | 114 DISALLOW_COPY_AND_ASSIGN(RendererPpapiHostImpl); |
111 }; | 115 }; |
112 | 116 |
113 } // namespace content | 117 } // namespace content |
114 | 118 |
115 #endif // CONTENT_RENDERER_PEPPER_RENDERER_PPAPI_HOST_IMPL_H_ | 119 #endif // CONTENT_RENDERER_PEPPER_RENDERER_PPAPI_HOST_IMPL_H_ |
OLD | NEW |