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_SHARED_IMPL_PPB_URL_REQUEST_INFO_SHARED_H_ | 5 #ifndef PPAPI_SHARED_IMPL_PPB_URL_REQUEST_INFO_SHARED_H_ |
6 #define PPAPI_SHARED_IMPL_PPB_URL_REQUEST_INFO_SHARED_H_ | 6 #define PPAPI_SHARED_IMPL_PPB_URL_REQUEST_INFO_SHARED_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 // Set if the input is a file, false means the |data| is valid. | 26 // Set if the input is a file, false means the |data| is valid. |
27 bool is_file; | 27 bool is_file; |
28 | 28 |
29 std::string data; | 29 std::string data; |
30 | 30 |
31 // Is is_file is set, these variables are set. Note that the resource | 31 // Is is_file is set, these variables are set. Note that the resource |
32 // may still be NULL in some cases, such as deserialization errors. | 32 // may still be NULL in some cases, such as deserialization errors. |
33 // | 33 // |
34 // This is a bit tricky. In the plugin side of the proxy, both the file ref | 34 // This is a bit tricky. In the plugin side of the proxy, both the file ref |
35 // and the file_ref_host_resource will be set and valid. The scoped_ptr | 35 // and the file_ref_host_resource will be set and valid. The scoped_refptr |
36 // ensures that the resource is alive for as long as the BodyItem is. | 36 // ensures that the resource is alive for as long as the BodyItem is. |
37 // | 37 // |
38 // When we deserialize this in the renderer, only the | 38 // When we deserialize this in the renderer, only the |
39 // file_ref_host_resource's are serialized over IPC. The file_refs won't be | 39 // file_ref_host_resource's are serialized over IPC. The file_refs won't be |
40 // valid until the host resources are converted to Resource pointers in the | 40 // valid until the host resources are converted to Resource pointers in the |
41 // PPB_URLRequestInfo_Impl. | 41 // PPB_URLRequestInfo_Impl. |
42 scoped_refptr<Resource> file_ref; | 42 scoped_refptr<Resource> file_ref; |
43 HostResource file_ref_host_resource; | 43 HostResource file_ref_host_resource; |
44 | 44 |
45 int64_t start_offset; | 45 int64_t start_offset; |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 | 125 |
126 private: | 126 private: |
127 PPB_URLRequestInfo_Data data_; | 127 PPB_URLRequestInfo_Data data_; |
128 | 128 |
129 DISALLOW_IMPLICIT_CONSTRUCTORS(PPB_URLRequestInfo_Shared); | 129 DISALLOW_IMPLICIT_CONSTRUCTORS(PPB_URLRequestInfo_Shared); |
130 }; | 130 }; |
131 | 131 |
132 } // namespace ppapi | 132 } // namespace ppapi |
133 | 133 |
134 #endif // PPAPI_SHARED_IMPL_PPB_URL_REQUEST_INFO_SHARED_H_ | 134 #endif // PPAPI_SHARED_IMPL_PPB_URL_REQUEST_INFO_SHARED_H_ |
OLD | NEW |