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