| 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 PPAPI_PROXY_RESOURCE_MESSAGE_PARAMS_H_ | 5 #ifndef PPAPI_PROXY_RESOURCE_MESSAGE_PARAMS_H_ |
| 6 #define PPAPI_PROXY_RESOURCE_MESSAGE_PARAMS_H_ | 6 #define PPAPI_PROXY_RESOURCE_MESSAGE_PARAMS_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ipc/ipc_message_utils.h" | 10 #include "ipc/ipc_message_utils.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 // placed in the output parameter and the function will return true. If the | 38 // placed in the output parameter and the function will return true. If the |
| 39 // handle doesn't exist or is a different type, the functions will return | 39 // handle doesn't exist or is a different type, the functions will return |
| 40 // false and the output parameter will be untouched. | 40 // false and the output parameter will be untouched. |
| 41 // | 41 // |
| 42 // Note that the handle could still be a "null" or invalid handle of | 42 // Note that the handle could still be a "null" or invalid handle of |
| 43 // the right type and the functions will succeed. | 43 // the right type and the functions will succeed. |
| 44 bool GetSharedMemoryHandleAtIndex(size_t index, | 44 bool GetSharedMemoryHandleAtIndex(size_t index, |
| 45 base::SharedMemoryHandle* handle) const; | 45 base::SharedMemoryHandle* handle) const; |
| 46 bool GetSocketHandleAtIndex(size_t index, | 46 bool GetSocketHandleAtIndex(size_t index, |
| 47 IPC::PlatformFileForTransit* handle) const; | 47 IPC::PlatformFileForTransit* handle) const; |
| 48 void GetAllSharedMemoryHandles( |
| 49 std::vector<base::SharedMemoryHandle>* handles) const; |
| 48 | 50 |
| 49 // Appends the given handle to the list of handles sent with the call or | 51 // Appends the given handle to the list of handles sent with the call or |
| 50 // reply. | 52 // reply. |
| 51 void AppendHandle(const SerializedHandle& handle); | 53 void AppendHandle(const SerializedHandle& handle); |
| 52 | 54 |
| 53 protected: | 55 protected: |
| 54 ResourceMessageParams(); | 56 ResourceMessageParams(); |
| 55 ResourceMessageParams(PP_Resource resource, int32_t sequence); | 57 ResourceMessageParams(PP_Resource resource, int32_t sequence); |
| 56 | 58 |
| 57 virtual void Serialize(IPC::Message* msg) const; | 59 virtual void Serialize(IPC::Message* msg) const; |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 static bool Read(const Message* m, PickleIterator* iter, param_type* r) { | 149 static bool Read(const Message* m, PickleIterator* iter, param_type* r) { |
| 148 return r->Deserialize(m, iter); | 150 return r->Deserialize(m, iter); |
| 149 } | 151 } |
| 150 static void Log(const param_type& p, std::string* l) { | 152 static void Log(const param_type& p, std::string* l) { |
| 151 } | 153 } |
| 152 }; | 154 }; |
| 153 | 155 |
| 154 } // namespace IPC | 156 } // namespace IPC |
| 155 | 157 |
| 156 #endif // PPAPI_PROXY_RESOURCE_MESSAGE_PARAMS_H_ | 158 #endif // PPAPI_PROXY_RESOURCE_MESSAGE_PARAMS_H_ |
| OLD | NEW |