OLD | NEW |
1 // -*- c++ -*- | 1 // -*- c++ -*- |
2 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
5 | 5 |
6 // The portable representation of an instance and root scriptable object. | 6 // The portable representation of an instance and root scriptable object. |
7 // The PPAPI version of the plugin instantiates a subclass of this class. | 7 // The PPAPI version of the plugin instantiates a subclass of this class. |
8 | 8 |
9 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_H_ | 9 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_H_ |
10 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_H_ | 10 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_H_ |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 | 142 |
143 nacl::DescWrapperFactory* wrapper_factory() const { return wrapper_factory_; } | 143 nacl::DescWrapperFactory* wrapper_factory() const { return wrapper_factory_; } |
144 | 144 |
145 // Requests a NaCl manifest download from a |url| relative to the page origin. | 145 // Requests a NaCl manifest download from a |url| relative to the page origin. |
146 void RequestNaClManifest(const nacl::string& url); | 146 void RequestNaClManifest(const nacl::string& url); |
147 | 147 |
148 // Called back by CallOnMainThread. Dispatches the first enqueued progress | 148 // Called back by CallOnMainThread. Dispatches the first enqueued progress |
149 // event. | 149 // event. |
150 void DispatchProgressEvent(int32_t result); | 150 void DispatchProgressEvent(int32_t result); |
151 | 151 |
152 // Requests a URL asynchronously, resulting in a call to |callback| with | |
153 // an error code indicating status. On success, writes file information to | |
154 // |file_info|. | |
155 void StreamAsFile(const nacl::string& url, | |
156 PP_NaClFileInfo* file_info, | |
157 const pp::CompletionCallback& callback); | |
158 | |
159 // A helper function that indicates if |url| can be requested by the document | 152 // A helper function that indicates if |url| can be requested by the document |
160 // under the same-origin policy. Strictly speaking, it may be possible for the | 153 // under the same-origin policy. Strictly speaking, it may be possible for the |
161 // document to request the URL using CORS even if this function returns false. | 154 // document to request the URL using CORS even if this function returns false. |
162 bool DocumentCanRequest(const std::string& url); | 155 bool DocumentCanRequest(const std::string& url); |
163 | 156 |
164 // set_exit_status may be called off the main thread. | 157 // set_exit_status may be called off the main thread. |
165 void set_exit_status(int exit_status); | 158 void set_exit_status(int exit_status); |
166 | 159 |
167 const PPB_NaCl_Private* nacl_interface() const { return nacl_interface_; } | 160 const PPB_NaCl_Private* nacl_interface() const { return nacl_interface_; } |
168 pp::UMAPrivate& uma_interface() { return uma_interface_; } | 161 pp::UMAPrivate& uma_interface() { return uma_interface_; } |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 uint64_t nexe_token_lo_; | 267 uint64_t nexe_token_lo_; |
275 uint64_t nexe_token_hi_; | 268 uint64_t nexe_token_hi_; |
276 | 269 |
277 const PPB_NaCl_Private* nacl_interface_; | 270 const PPB_NaCl_Private* nacl_interface_; |
278 pp::UMAPrivate uma_interface_; | 271 pp::UMAPrivate uma_interface_; |
279 }; | 272 }; |
280 | 273 |
281 } // namespace plugin | 274 } // namespace plugin |
282 | 275 |
283 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_H_ | 276 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_H_ |
OLD | NEW |