OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 PPAPI_SHARED_IMPL_HOST_RESOURCE_H_ | 5 #ifndef PPAPI_SHARED_IMPL_HOST_RESOURCE_H_ |
6 #define PPAPI_SHARED_IMPL_HOST_RESOURCE_H_ | 6 #define PPAPI_SHARED_IMPL_HOST_RESOURCE_H_ |
7 | 7 |
8 #include "ppapi/c/pp_instance.h" | 8 #include "ppapi/c/pp_instance.h" |
9 #include "ppapi/c/pp_resource.h" | 9 #include "ppapi/c/pp_resource.h" |
10 #include "ppapi/shared_impl/ppapi_shared_export.h" | 10 #include "ppapi/shared_impl/ppapi_shared_export.h" |
11 | 11 |
12 namespace ppapi { | 12 namespace ppapi { |
13 | 13 |
14 // For "old" style resources, PP_Resource values differ on the host and plugin | 14 // For "old" style resources, PP_Resource values differ on the host and plugin |
15 // side. Implementations of those should be careful to use HostResource to | 15 // side. Implementations of those should be careful to use HostResource to |
16 // prevent confusion. "New" style resources use the same PP_Resource value on | 16 // prevent confusion. "New" style resources use the same PP_Resource value on |
17 // the host and plugin sides, and should not use HostResource. | 17 // the host and plugin sides, and should not use HostResource. |
18 // | 18 // |
19 // Old style resources match these file specs: | 19 // Old style resources match these file specs: |
20 // Proxy: ppapi/proxy/ppb_*_proxy.* | 20 // Proxy: ppapi/proxy/ppb_*_proxy.* |
21 // Host: webkit/plugins/ppapi/* | 21 // Host: content/ppapi_plugin/* |
22 // New style resources match these file specs: | 22 // New style resources match these file specs: |
23 // Proxy: ppapi/proxy/*_resource.* | 23 // Proxy: ppapi/proxy/*_resource.* |
24 // Browser: (content|chrome)/browser/renderer_host/pepper/pepper_*_host.* | 24 // Browser: (content|chrome)/browser/renderer_host/pepper/pepper_*_host.* |
25 // Renderer: (content|chrome)/renderer/pepper/pepper_*_host.* | 25 // Renderer: (content|chrome)/renderer/pepper/pepper_*_host.* |
26 // | 26 // |
27 // | 27 // |
28 // Represents a PP_Resource sent over the wire. This just wraps a PP_Resource. | 28 // Represents a PP_Resource sent over the wire. This just wraps a PP_Resource. |
29 // The point is to prevent mistakes where the wrong resource value is sent. | 29 // The point is to prevent mistakes where the wrong resource value is sent. |
30 // Resource values are remapped in the plugin so that it can talk to multiple | 30 // Resource values are remapped in the plugin so that it can talk to multiple |
31 // hosts. If all values were PP_Resource, it would be easy to forget to do | 31 // hosts. If all values were PP_Resource, it would be easy to forget to do |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 } | 65 } |
66 | 66 |
67 private: | 67 private: |
68 PP_Instance instance_; | 68 PP_Instance instance_; |
69 PP_Resource host_resource_; | 69 PP_Resource host_resource_; |
70 }; | 70 }; |
71 | 71 |
72 } // namespace ppapi | 72 } // namespace ppapi |
73 | 73 |
74 #endif // PPAPI_SHARED_IMPL_HOST_RESOURCE_H_ | 74 #endif // PPAPI_SHARED_IMPL_HOST_RESOURCE_H_ |
OLD | NEW |