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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 // Returns NULL or the NaClSubprocess of the new helper NaCl module. | 114 // Returns NULL or the NaClSubprocess of the new helper NaCl module. |
115 NaClSubprocess* LoadHelperNaClModule(const nacl::string& helper_url, | 115 NaClSubprocess* LoadHelperNaClModule(const nacl::string& helper_url, |
116 PP_NaClFileInfo file_info, | 116 PP_NaClFileInfo file_info, |
117 ErrorInfo* error_info); | 117 ErrorInfo* error_info); |
118 | 118 |
119 // Report an error that was encountered while loading a module. | 119 // Report an error that was encountered while loading a module. |
120 void ReportLoadError(const ErrorInfo& error_info); | 120 void ReportLoadError(const ErrorInfo& error_info); |
121 | 121 |
122 nacl::DescWrapperFactory* wrapper_factory() const { return wrapper_factory_; } | 122 nacl::DescWrapperFactory* wrapper_factory() const { return wrapper_factory_; } |
123 | 123 |
124 // A helper function that indicates if |url| can be requested by the document | |
125 // under the same-origin policy. Strictly speaking, it may be possible for the | |
126 // document to request the URL using CORS even if this function returns false. | |
127 bool DocumentCanRequest(const std::string& url); | |
128 | |
129 const PPB_NaCl_Private* nacl_interface() const { return nacl_interface_; } | 124 const PPB_NaCl_Private* nacl_interface() const { return nacl_interface_; } |
130 pp::UMAPrivate& uma_interface() { return uma_interface_; } | 125 pp::UMAPrivate& uma_interface() { return uma_interface_; } |
131 | 126 |
132 private: | 127 private: |
133 NACL_DISALLOW_COPY_AND_ASSIGN(Plugin); | 128 NACL_DISALLOW_COPY_AND_ASSIGN(Plugin); |
134 // The browser will invoke the destructor via the pp::Instance | 129 // The browser will invoke the destructor via the pp::Instance |
135 // pointer to this object, not from base's Delete(). | 130 // pointer to this object, not from base's Delete(). |
136 ~Plugin(); | 131 ~Plugin(); |
137 | 132 |
138 // Shuts down socket connection, service runtime, and receive thread, | 133 // Shuts down socket connection, service runtime, and receive thread, |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 | 200 |
206 PP_NaClFileInfo nexe_file_info_; | 201 PP_NaClFileInfo nexe_file_info_; |
207 | 202 |
208 const PPB_NaCl_Private* nacl_interface_; | 203 const PPB_NaCl_Private* nacl_interface_; |
209 pp::UMAPrivate uma_interface_; | 204 pp::UMAPrivate uma_interface_; |
210 }; | 205 }; |
211 | 206 |
212 } // namespace plugin | 207 } // namespace plugin |
213 | 208 |
214 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_H_ | 209 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_H_ |
OLD | NEW |