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

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: Fix NULL return. 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
« no previous file with comments | « no previous file | ppapi/native_client/src/trusted/plugin/plugin.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 // Load support. 110 // Load support.
111 // A helper SRPC NaCl module can be loaded given a DescWrapper. 111 // A helper SRPC NaCl module can be loaded given a DescWrapper.
112 // Blocks until the helper module signals initialization is done. 112 // Blocks until the helper module signals initialization is done.
113 // Does not update nacl_module_origin(). 113 // Does not update nacl_module_origin().
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(nacl::DescWrapper* wrapper, 115 NaClSubprocess* LoadHelperNaClModule(nacl::DescWrapper* wrapper,
116 const Manifest* manifest, 116 const Manifest* manifest,
117 ErrorInfo* error_info); 117 ErrorInfo* error_info);
118 118
119 // Returns the argument value for the specified key, or NULL if not found. 119 // Returns the argument value for the specified key, or NULL if not found.
120 // The callee retains ownership of the result. 120 std::string LookupArgument(const std::string& key) const;
121 char* LookupArgument(const char* key);
122 121
123 enum LengthComputable { 122 enum LengthComputable {
124 LENGTH_IS_NOT_COMPUTABLE = 0, 123 LENGTH_IS_NOT_COMPUTABLE = 0,
125 LENGTH_IS_COMPUTABLE = 1 124 LENGTH_IS_COMPUTABLE = 1
126 }; 125 };
127 // Report successful loading of a module. 126 // Report successful loading of a module.
128 void ReportLoadSuccess(LengthComputable length_computable, 127 void ReportLoadSuccess(LengthComputable length_computable,
129 uint64_t loaded_bytes, 128 uint64_t loaded_bytes,
130 uint64_t total_bytes); 129 uint64_t total_bytes);
131 // Report an error that was encountered while loading a module. 130 // Report an error that was encountered while loading a module.
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 373
375 // Open an app file by requesting a file descriptor from the browser. This 374 // Open an app file by requesting a file descriptor from the browser. This
376 // method first checks that the url is for an installed file before making the 375 // method first checks that the url is for an installed file before making the
377 // request so it won't slow down non-installed file downloads. 376 // request so it won't slow down non-installed file downloads.
378 bool OpenURLFast(const nacl::string& url, FileDownloader* downloader); 377 bool OpenURLFast(const nacl::string& url, FileDownloader* downloader);
379 378
380 void set_nacl_ready_state(ReadyState state); 379 void set_nacl_ready_state(ReadyState state);
381 380
382 void SetExitStatusOnMainThread(int32_t pp_error, int exit_status); 381 void SetExitStatusOnMainThread(int32_t pp_error, int exit_status);
383 382
384 int argc_; 383 std::map<std::string, std::string> args_;
385 char** argn_;
386 char** argv_;
387 384
388 // Keep track of the NaCl module subprocess that was spun up in the plugin. 385 // Keep track of the NaCl module subprocess that was spun up in the plugin.
389 NaClSubprocess main_subprocess_; 386 NaClSubprocess main_subprocess_;
390 387
391 nacl::string plugin_base_url_; 388 nacl::string plugin_base_url_;
392 nacl::string manifest_base_url_; 389 nacl::string manifest_base_url_;
393 nacl::string manifest_url_; 390 nacl::string manifest_url_;
394 ReadyState nacl_ready_state_; 391 ReadyState nacl_ready_state_;
395 bool nexe_error_reported_; // error or crash reported 392 bool nexe_error_reported_; // error or crash reported
396 393
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 int64_t time_of_last_progress_event_; 465 int64_t time_of_last_progress_event_;
469 int exit_status_; 466 int exit_status_;
470 467
471 const PPB_NaCl_Private* nacl_interface_; 468 const PPB_NaCl_Private* nacl_interface_;
472 pp::UMAPrivate uma_interface_; 469 pp::UMAPrivate uma_interface_;
473 }; 470 };
474 471
475 } // namespace plugin 472 } // namespace plugin
476 473
477 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_H_ 474 #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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698