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

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

Issue 316653002: Pepper: Remove Plugin::EnqueueProgressEvent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 6 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 103
104 // Load support. 104 // Load support.
105 // A helper SRPC NaCl module can be loaded given a PP_FileHandle. 105 // A helper SRPC NaCl module can be loaded given a PP_FileHandle.
106 // Blocks until the helper module signals initialization is done. 106 // Blocks until the helper module signals initialization is done.
107 // Does not update nacl_module_origin(). 107 // Does not update nacl_module_origin().
108 // Returns NULL or the NaClSubprocess of the new helper NaCl module. 108 // Returns NULL or the NaClSubprocess of the new helper NaCl module.
109 NaClSubprocess* LoadHelperNaClModule(const nacl::string& helper_url, 109 NaClSubprocess* LoadHelperNaClModule(const nacl::string& helper_url,
110 PP_FileHandle file_handle, 110 PP_FileHandle file_handle,
111 ErrorInfo* error_info); 111 ErrorInfo* error_info);
112 112
113 enum LengthComputable {
114 LENGTH_IS_NOT_COMPUTABLE = 0,
115 LENGTH_IS_COMPUTABLE = 1
116 };
117 // Report successful loading of a module. 113 // Report successful loading of a module.
118 void ReportLoadSuccess(uint64_t loaded_bytes, uint64_t total_bytes); 114 void ReportLoadSuccess(uint64_t loaded_bytes, uint64_t total_bytes);
119 // Report an error that was encountered while loading a module. 115 // Report an error that was encountered while loading a module.
120 void ReportLoadError(const ErrorInfo& error_info); 116 void ReportLoadError(const ErrorInfo& error_info);
121 // Report loading a module was aborted, typically due to user action. 117 // Report loading a module was aborted, typically due to user action.
122 void ReportLoadAbort(); 118 void ReportLoadAbort();
123 119
124 // Dispatch a JavaScript event to indicate a key step in loading.
125 // |event_type| is a character string indicating which type of progress
126 // event (loadstart, progress, error, abort, load, loadend). Events are
127 // enqueued on the JavaScript event loop, which then calls back through
128 // DispatchProgressEvent.
129 void EnqueueProgressEvent(PP_NaClEventType event_type,
130 const nacl::string& url,
131 LengthComputable length_computable,
132 uint64_t loaded_bytes,
133 uint64_t total_bytes);
134
135 // Report the error code that sel_ldr produces when starting a nexe. 120 // Report the error code that sel_ldr produces when starting a nexe.
136 void ReportSelLdrLoadStatus(int status); 121 void ReportSelLdrLoadStatus(int status);
137 122
138 nacl::DescWrapperFactory* wrapper_factory() const { return wrapper_factory_; } 123 nacl::DescWrapperFactory* wrapper_factory() const { return wrapper_factory_; }
139 124
140 // Requests a NaCl manifest download from a |url| relative to the page origin. 125 // Requests a NaCl manifest download from a |url| relative to the page origin.
141 void RequestNaClManifest(const nacl::string& url); 126 void RequestNaClManifest(const nacl::string& url);
142 127
143 // Called back by CallOnMainThread. Dispatches the first enqueued progress 128 // Called back by CallOnMainThread. Dispatches the first enqueued progress
144 // event. 129 // event.
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 242
258 PP_NaClFileInfo nexe_file_info_; 243 PP_NaClFileInfo nexe_file_info_;
259 244
260 const PPB_NaCl_Private* nacl_interface_; 245 const PPB_NaCl_Private* nacl_interface_;
261 pp::UMAPrivate uma_interface_; 246 pp::UMAPrivate uma_interface_;
262 }; 247 };
263 248
264 } // namespace plugin 249 } // namespace plugin
265 250
266 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_H_ 251 #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