OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_RAW_VAR_DATA_H_ | 5 #ifndef PPAPI_PROXY_RAW_VAR_DATA_H_ |
6 #define PPAPI_PROXY_RAW_VAR_DATA_H_ | 6 #define PPAPI_PROXY_RAW_VAR_DATA_H_ |
7 | 7 |
| 8 #include <stddef.h> |
| 9 #include <stdint.h> |
| 10 |
8 #include <vector> | 11 #include <vector> |
9 | 12 |
10 #include "base/callback.h" | 13 #include "base/callback.h" |
11 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
12 #include "base/memory/scoped_vector.h" | 15 #include "base/memory/scoped_vector.h" |
13 #include "ppapi/c/pp_instance.h" | 16 #include "ppapi/c/pp_instance.h" |
14 #include "ppapi/c/pp_var.h" | 17 #include "ppapi/c/pp_var.h" |
15 #include "ppapi/proxy/ppapi_param_traits.h" | 18 #include "ppapi/proxy/ppapi_param_traits.h" |
16 #include "ppapi/proxy/ppapi_proxy_export.h" | 19 #include "ppapi/proxy/ppapi_proxy_export.h" |
17 #include "ppapi/proxy/serialized_handle.h" | 20 #include "ppapi/proxy/serialized_handle.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 base::PickleIterator* iter); | 77 base::PickleIterator* iter); |
75 | 78 |
76 // Returns a vector of SerializedHandles associated with this RawVarDataGraph. | 79 // Returns a vector of SerializedHandles associated with this RawVarDataGraph. |
77 // Ownership of the pointers remains with the elements of the RawVarDataGraph. | 80 // Ownership of the pointers remains with the elements of the RawVarDataGraph. |
78 std::vector<SerializedHandle*> GetHandles(); | 81 std::vector<SerializedHandle*> GetHandles(); |
79 | 82 |
80 // Sets the threshold size at which point we switch from transmitting | 83 // Sets the threshold size at which point we switch from transmitting |
81 // array buffers in IPC messages to using shared memory. This is only used | 84 // array buffers in IPC messages to using shared memory. This is only used |
82 // for testing purposes where we need to transmit small buffers using shmem | 85 // for testing purposes where we need to transmit small buffers using shmem |
83 // (in order to have fast tests). | 86 // (in order to have fast tests). |
84 static void SetMinimumArrayBufferSizeForShmemForTest(uint32 threshold); | 87 static void SetMinimumArrayBufferSizeForShmemForTest(uint32_t threshold); |
85 | 88 |
86 // A list of the nodes in the graph. | 89 // A list of the nodes in the graph. |
87 ScopedVector<RawVarData> data_; | 90 ScopedVector<RawVarData> data_; |
88 }; | 91 }; |
89 | 92 |
90 // Abstract base class for the data contained in a PP_Var. | 93 // Abstract base class for the data contained in a PP_Var. |
91 class RawVarData { | 94 class RawVarData { |
92 public: | 95 public: |
93 // Create a new, empty RawVarData for the given type. | 96 // Create a new, empty RawVarData for the given type. |
94 static RawVarData* Create(PP_VarType type); | 97 static RawVarData* Create(PP_VarType type); |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 // resource. The message type will vary based on the resource type, and will | 293 // resource. The message type will vary based on the resource type, and will |
291 // usually contain a pending resource host ID, and other required information. | 294 // usually contain a pending resource host ID, and other required information. |
292 // If the resource was created directly, this is NULL. | 295 // If the resource was created directly, this is NULL. |
293 scoped_ptr<IPC::Message> creation_message_; | 296 scoped_ptr<IPC::Message> creation_message_; |
294 }; | 297 }; |
295 | 298 |
296 } // namespace proxy | 299 } // namespace proxy |
297 } // namespace ppapi | 300 } // namespace ppapi |
298 | 301 |
299 #endif // PPAPI_PROXY_RAW_VAR_DATA_H_ | 302 #endif // PPAPI_PROXY_RAW_VAR_DATA_H_ |
OLD | NEW |