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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 int argc() const { return argc_; } | 195 int argc() const { return argc_; } |
196 char** argn() const { return argn_; } | 196 char** argn() const { return argn_; } |
197 char** argv() const { return argv_; } | 197 char** argv() const { return argv_; } |
198 | 198 |
199 Plugin* plugin() const { return const_cast<Plugin*>(this); } | 199 Plugin* plugin() const { return const_cast<Plugin*>(this); } |
200 | 200 |
201 // URL resolution support. | 201 // URL resolution support. |
202 // plugin_base_url is the URL used for resolving relative URLs used in | 202 // plugin_base_url is the URL used for resolving relative URLs used in |
203 // src="...". | 203 // src="...". |
204 nacl::string plugin_base_url() const { return plugin_base_url_; } | 204 nacl::string plugin_base_url() const { return plugin_base_url_; } |
205 void set_plugin_base_url(nacl::string url) { plugin_base_url_ = url; } | 205 void set_plugin_base_url(const nacl::string& url) { plugin_base_url_ = url; } |
206 // manifest_base_url is the URL used for resolving relative URLs mentioned | 206 // manifest_base_url is the URL used for resolving relative URLs mentioned |
207 // in manifest files. If the manifest is a data URI, this is an empty string. | 207 // in manifest files. If the manifest is a data URI, this is an empty string. |
208 nacl::string manifest_base_url() const { return manifest_base_url_; } | 208 nacl::string manifest_base_url() const { return manifest_base_url_; } |
209 void set_manifest_base_url(nacl::string url) { manifest_base_url_ = url; } | 209 void set_manifest_base_url(const nacl::string& url) { |
| 210 manifest_base_url_ = url; |
| 211 } |
210 | 212 |
211 // The URL of the manifest file as set by the "src" attribute. | 213 // The URL of the manifest file as set by the "src" attribute. |
212 // It is not the fully resolved URL if it was set as relative. | 214 // It is not the fully resolved URL if it was set as relative. |
213 const nacl::string& manifest_url() const { return manifest_url_; } | 215 const nacl::string& manifest_url() const { return manifest_url_; } |
214 void set_manifest_url(const nacl::string& manifest_url) { | 216 void set_manifest_url(const nacl::string& manifest_url) { |
215 manifest_url_ = manifest_url; | 217 manifest_url_ = manifest_url; |
216 } | 218 } |
217 | 219 |
218 // The state of readiness of the plugin. | 220 // The state of readiness of the plugin. |
219 enum ReadyState { | 221 enum ReadyState { |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 | 529 |
528 // Whether we are using IPC-based PPAPI proxy. | 530 // Whether we are using IPC-based PPAPI proxy. |
529 bool using_ipc_proxy_; | 531 bool using_ipc_proxy_; |
530 | 532 |
531 const PPB_NaCl_Private* nacl_interface_; | 533 const PPB_NaCl_Private* nacl_interface_; |
532 }; | 534 }; |
533 | 535 |
534 } // namespace plugin | 536 } // namespace plugin |
535 | 537 |
536 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_H_ | 538 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_H_ |
OLD | NEW |