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 CONTENT_RENDERER_PEPPER_PEPPER_URL_LOADER_HOST_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_URL_LOADER_HOST_H_ |
6 #define CONTENT_RENDERER_PEPPER_PEPPER_URL_LOADER_HOST_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_URL_LOADER_HOST_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 // Set to true when this loader can ignore same originl policy. | 125 // Set to true when this loader can ignore same originl policy. |
126 bool has_universal_access_; | 126 bool has_universal_access_; |
127 | 127 |
128 // The loader associated with this request. MAY BE NULL. | 128 // The loader associated with this request. MAY BE NULL. |
129 // | 129 // |
130 // This will be NULL if the load hasn't been opened yet, or if this is a main | 130 // This will be NULL if the load hasn't been opened yet, or if this is a main |
131 // document loader (when registered as a mime type). Therefore, you should | 131 // document loader (when registered as a mime type). Therefore, you should |
132 // always NULL check this value before using it. In the case of a main | 132 // always NULL check this value before using it. In the case of a main |
133 // document load, you would call the functions on the document to cancel the | 133 // document load, you would call the functions on the document to cancel the |
134 // load, etc. since there is no loader. | 134 // load, etc. since there is no loader. |
135 scoped_ptr<blink::WebURLLoader> loader_; | 135 std::unique_ptr<blink::WebURLLoader> loader_; |
136 | 136 |
137 int64_t bytes_sent_; | 137 int64_t bytes_sent_; |
138 int64_t total_bytes_to_be_sent_; | 138 int64_t total_bytes_to_be_sent_; |
139 int64_t bytes_received_; | 139 int64_t bytes_received_; |
140 int64_t total_bytes_to_be_received_; | 140 int64_t total_bytes_to_be_received_; |
141 | 141 |
142 // Messages sent while the resource host is pending. These will be forwarded | 142 // Messages sent while the resource host is pending. These will be forwarded |
143 // to the plugin when the plugin side connects. The pointers are owned by | 143 // to the plugin when the plugin side connects. The pointers are owned by |
144 // this object and must be deleted. | 144 // this object and must be deleted. |
145 ScopedVector<IPC::Message> pending_replies_; | 145 ScopedVector<IPC::Message> pending_replies_; |
146 ScopedVector<IPC::Message> out_of_order_replies_; | 146 ScopedVector<IPC::Message> out_of_order_replies_; |
147 | 147 |
148 // True when there's a pending DataFromURLResponse call which will send a | 148 // True when there's a pending DataFromURLResponse call which will send a |
149 // PpapiPluginMsg_URLLoader_ReceivedResponse to the plugin, which introduces | 149 // PpapiPluginMsg_URLLoader_ReceivedResponse to the plugin, which introduces |
150 // ordering constraints on following messages to the plugin. | 150 // ordering constraints on following messages to the plugin. |
151 bool pending_response_; | 151 bool pending_response_; |
152 | 152 |
153 base::WeakPtrFactory<PepperURLLoaderHost> weak_factory_; | 153 base::WeakPtrFactory<PepperURLLoaderHost> weak_factory_; |
154 | 154 |
155 DISALLOW_COPY_AND_ASSIGN(PepperURLLoaderHost); | 155 DISALLOW_COPY_AND_ASSIGN(PepperURLLoaderHost); |
156 }; | 156 }; |
157 | 157 |
158 } // namespace content | 158 } // namespace content |
159 | 159 |
160 #endif // CONTENT_RENDERER_PEPPER_PEPPER_URL_LOADER_HOST_H_ | 160 #endif // CONTENT_RENDERER_PEPPER_PEPPER_URL_LOADER_HOST_H_ |
OLD | NEW |