| 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/callback_forward.h" | 8 #include "base/callback_forward.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/platform_file.h" | 10 #include "base/platform_file.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 class RenderView; | 40 class RenderView; |
| 41 | 41 |
| 42 // Interface that allows components in the embedder app to talk to the | 42 // Interface that allows components in the embedder app to talk to the |
| 43 // PpapiHost in the renderer process. | 43 // PpapiHost in the renderer process. |
| 44 // | 44 // |
| 45 // There will be one of these objects in the renderer per plugin module. | 45 // There will be one of these objects in the renderer per plugin module. |
| 46 class RendererPpapiHost { | 46 class RendererPpapiHost { |
| 47 public: | 47 public: |
| 48 // Returns the RendererPpapiHost associated with the given PP_Instance, | 48 // Returns the RendererPpapiHost associated with the given PP_Instance, |
| 49 // or NULL if the instance is invalid. | 49 // or NULL if the instance is invalid. |
| 50 // |
| 51 // Do NOT use this when dealing with the "NaCl trusted plugin". That plugin |
| 52 // and the "untrusted plugin" (the NaCl application) that will be loaded |
| 53 // share a PP_Instance, and the RendererPpapiHost* for the "untrusted plugin" |
| 54 // will be returned after we switch the proxy on. |
| 50 CONTENT_EXPORT static RendererPpapiHost* GetForPPInstance( | 55 CONTENT_EXPORT static RendererPpapiHost* GetForPPInstance( |
| 51 PP_Instance instance); | 56 PP_Instance instance); |
| 52 | 57 |
| 53 // Returns the PpapiHost object. | 58 // Returns the PpapiHost object. |
| 54 virtual ppapi::host::PpapiHost* GetPpapiHost() = 0; | 59 virtual ppapi::host::PpapiHost* GetPpapiHost() = 0; |
| 55 | 60 |
| 56 // Returns true if the given PP_Instance is valid and belongs to the | 61 // Returns true if the given PP_Instance is valid and belongs to the |
| 57 // plugin associated with this host. | 62 // plugin associated with this host. |
| 58 virtual bool IsValidInstance(PP_Instance instance) const = 0; | 63 virtual bool IsValidInstance(PP_Instance instance) const = 0; |
| 59 | 64 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 const IPC::Message& nested_msg, | 126 const IPC::Message& nested_msg, |
| 122 const base::Callback<void(int)>& callback) const = 0; | 127 const base::Callback<void(int)>& callback) const = 0; |
| 123 | 128 |
| 124 protected: | 129 protected: |
| 125 virtual ~RendererPpapiHost() {} | 130 virtual ~RendererPpapiHost() {} |
| 126 }; | 131 }; |
| 127 | 132 |
| 128 } // namespace content | 133 } // namespace content |
| 129 | 134 |
| 130 #endif // CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_ | 135 #endif // CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_ |
| OLD | NEW |