Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(727)

Side by Side Diff: ppapi/native_client/src/trusted/plugin/plugin.h

Issue 161403002: Pepper: Clean up trusted plugin arguments. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 // Load support. 115 // Load support.
116 // A helper SRPC NaCl module can be loaded given a DescWrapper. 116 // A helper SRPC NaCl module can be loaded given a DescWrapper.
117 // Blocks until the helper module signals initialization is done. 117 // Blocks until the helper module signals initialization is done.
118 // Does not update nacl_module_origin(). 118 // Does not update nacl_module_origin().
119 // Returns NULL or the NaClSubprocess of the new helper NaCl module. 119 // Returns NULL or the NaClSubprocess of the new helper NaCl module.
120 NaClSubprocess* LoadHelperNaClModule(nacl::DescWrapper* wrapper, 120 NaClSubprocess* LoadHelperNaClModule(nacl::DescWrapper* wrapper,
121 const Manifest* manifest, 121 const Manifest* manifest,
122 ErrorInfo* error_info); 122 ErrorInfo* error_info);
123 123
124 // Returns the argument value for the specified key, or NULL if not found. 124 // Returns the argument value for the specified key, or NULL if not found.
125 // The callee retains ownership of the result. 125 std::string LookupArgument(const std::string& key) const;
126 char* LookupArgument(const char* key);
127 126
128 enum LengthComputable { 127 enum LengthComputable {
129 LENGTH_IS_NOT_COMPUTABLE = 0, 128 LENGTH_IS_NOT_COMPUTABLE = 0,
130 LENGTH_IS_COMPUTABLE = 1 129 LENGTH_IS_COMPUTABLE = 1
131 }; 130 };
132 // Report successful loading of a module. 131 // Report successful loading of a module.
133 void ReportLoadSuccess(LengthComputable length_computable, 132 void ReportLoadSuccess(LengthComputable length_computable,
134 uint64_t loaded_bytes, 133 uint64_t loaded_bytes,
135 uint64_t total_bytes); 134 uint64_t total_bytes);
136 // Report an error that was encountered while loading a module. 135 // Report an error that was encountered while loading a module.
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 // method first checks that the url is for an installed file before making the 385 // method first checks that the url is for an installed file before making the
387 // request so it won't slow down non-installed file downloads. 386 // request so it won't slow down non-installed file downloads.
388 bool OpenURLFast(const nacl::string& url, FileDownloader* downloader); 387 bool OpenURLFast(const nacl::string& url, FileDownloader* downloader);
389 388
390 void set_nacl_ready_state(ReadyState state); 389 void set_nacl_ready_state(ReadyState state);
391 390
392 void SetExitStatusOnMainThread(int32_t pp_error, int exit_status); 391 void SetExitStatusOnMainThread(int32_t pp_error, int exit_status);
393 392
394 ScriptablePlugin* scriptable_plugin_; 393 ScriptablePlugin* scriptable_plugin_;
395 394
396 int argc_; 395 std::map<std::string, std::string> args_;
397 char** argn_;
398 char** argv_;
399 396
400 // Keep track of the NaCl module subprocess that was spun up in the plugin. 397 // Keep track of the NaCl module subprocess that was spun up in the plugin.
401 NaClSubprocess main_subprocess_; 398 NaClSubprocess main_subprocess_;
402 399
403 nacl::string plugin_base_url_; 400 nacl::string plugin_base_url_;
404 nacl::string manifest_base_url_; 401 nacl::string manifest_base_url_;
405 nacl::string manifest_url_; 402 nacl::string manifest_url_;
406 ReadyState nacl_ready_state_; 403 ReadyState nacl_ready_state_;
407 bool nexe_error_reported_; // error or crash reported 404 bool nexe_error_reported_; // error or crash reported
408 405
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 int64_t time_of_last_progress_event_; 477 int64_t time_of_last_progress_event_;
481 int exit_status_; 478 int exit_status_;
482 479
483 const PPB_NaCl_Private* nacl_interface_; 480 const PPB_NaCl_Private* nacl_interface_;
484 pp::UMAPrivate uma_interface_; 481 pp::UMAPrivate uma_interface_;
485 }; 482 };
486 483
487 } // namespace plugin 484 } // namespace plugin
488 485
489 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_H_ 486 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_H_
OLDNEW
« no previous file with comments | « no previous file | ppapi/native_client/src/trusted/plugin/plugin.cc » ('j') | ppapi/native_client/src/trusted/plugin/plugin.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698