Commit 7c5cb04e authored by dmichael@chromium.org's avatar dmichael@chromium.org

PPAPI/NaCl: Move event dispatching from the plugin

Added chrome/renderer/nacl and OWNERS

Requires the following blink change: https://codereview.chromium.org/14773025/

BUG=239656
R=jam@chromium.org, marja@chromium.org, teravest@chromium.org

Review URL: https://codereview.chromium.org/14588009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233356 0039d316-1c4b-4281-b951-d872f2087c98
parent cf83d9e7
......@@ -29,11 +29,13 @@
#include "ppapi/shared_impl/ppapi_preferences.h"
#include "ppapi/shared_impl/var.h"
#include "ppapi/thunk/enter.h"
#include "third_party/WebKit/public/web/WebDOMResourceProgressEvent.h"
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebElement.h"
#include "third_party/WebKit/public/web/WebFrame.h"
#include "third_party/WebKit/public/web/WebPluginContainer.h"
#include "third_party/WebKit/public/web/WebView.h"
#include "v8/include/v8.h"
namespace {
......@@ -79,15 +81,15 @@ static int GetRoutingID(PP_Instance instance) {
// Launch NaCl's sel_ldr process.
PP_ExternalPluginResult LaunchSelLdr(PP_Instance instance,
const char* alleged_url,
PP_Bool uses_irt,
PP_Bool uses_ppapi,
PP_Bool enable_ppapi_dev,
PP_Bool enable_dyncode_syscalls,
PP_Bool enable_exception_handling,
PP_Bool enable_crash_throttling,
void* imc_handle,
struct PP_Var* error_message) {
const char* alleged_url,
PP_Bool uses_irt,
PP_Bool uses_ppapi,
PP_Bool enable_ppapi_dev,
PP_Bool enable_dyncode_syscalls,
PP_Bool enable_exception_handling,
PP_Bool enable_crash_throttling,
void* imc_handle,
struct PP_Var* error_message) {
nacl::FileDescriptor result_socket;
IPC::Sender* sender = content::RenderThread::Get();
DCHECK(sender);
......@@ -336,6 +338,75 @@ PP_FileHandle OpenNaClExecutable(PP_Instance instance,
return handle;
}
WebKit::WebString EventTypeToString(PP_NaClEventType event_type) {
switch (event_type) {
case PP_NACL_EVENT_LOADSTART:
return WebKit::WebString::fromUTF8("loadstart");
case PP_NACL_EVENT_PROGRESS:
return WebKit::WebString::fromUTF8("progress");
case PP_NACL_EVENT_ERROR:
return WebKit::WebString::fromUTF8("error");
case PP_NACL_EVENT_ABORT:
return WebKit::WebString::fromUTF8("abort");
case PP_NACL_EVENT_LOAD:
return WebKit::WebString::fromUTF8("load");
case PP_NACL_EVENT_LOADEND:
return WebKit::WebString::fromUTF8("loadend");
case PP_NACL_EVENT_CRASH:
return WebKit::WebString::fromUTF8("crash");
}
NOTIMPLEMENTED();
return WebKit::WebString();
}
void DispatchEvent(PP_Instance instance,
PP_NaClEventType event_type,
struct PP_Var resource_url,
PP_Bool length_is_computable,
uint64_t loaded_bytes,
uint64_t total_bytes) {
content::PepperPluginInstance* plugin_instance =
content::PepperPluginInstance::Get(instance);
if (!plugin_instance) {
NOTREACHED();
return;
}
WebKit::WebPluginContainer* container = plugin_instance->GetContainer();
// It's possible that container() is NULL if the plugin has been removed from
// the DOM (but the PluginInstance is not destroyed yet).
if (!container)
return;
WebKit::WebFrame* frame = container->element().document().frame();
if (!frame)
return;
v8::HandleScope handle_scope(plugin_instance->GetIsolate());
v8::Local<v8::Context> context(
plugin_instance->GetIsolate()->GetCurrentContext());
if (context.IsEmpty()) {
// If there's no JavaScript on the stack, we have to make a new Context.
context = v8::Context::New(plugin_instance->GetIsolate());
}
v8::Context::Scope context_scope(context);
ppapi::StringVar* url_var = ppapi::StringVar::FromPPVar(resource_url);
if (url_var) {
WebKit::WebString url_string = WebKit::WebString::fromUTF8(
url_var->value().data(), url_var->value().size());
WebKit::WebDOMResourceProgressEvent event(EventTypeToString(event_type),
PP_ToBool(length_is_computable),
loaded_bytes,
total_bytes,
url_string);
container->element().dispatchEvent(event);
} else {
WebKit::WebDOMProgressEvent event(EventTypeToString(event_type),
PP_ToBool(length_is_computable),
loaded_bytes,
total_bytes);
container->element().dispatchEvent(event);
}
}
const PPB_NaCl_Private nacl_interface = {
&LaunchSelLdr,
&StartPpapiProxy,
......@@ -348,7 +419,8 @@ const PPB_NaCl_Private nacl_interface = {
&ReportTranslationFinished,
&IsOffTheRecord,
&ReportNaClError,
&OpenNaClExecutable
&OpenNaClExecutable,
&DispatchEvent
};
} // namespace
......
......@@ -36,6 +36,10 @@ namespace WebKit {
class WebPluginContainer;
}
namespace v8 {
class Isolate;
}
namespace content {
class RenderView;
......@@ -49,6 +53,8 @@ class PepperPluginInstance {
virtual WebKit::WebPluginContainer* GetContainer() = 0;
virtual v8::Isolate* GetIsolate() const = 0;
virtual ppapi::VarTracker* GetVarTracker() = 0;
virtual const GURL& GetPluginURL() = 0;
......
......@@ -1374,12 +1374,22 @@ bool PepperPluginInstanceImpl::LoadPrintInterface() {
}
bool PepperPluginInstanceImpl::LoadPrivateInterface() {
// If this is a NaCl app, we want to talk to the trusted NaCl plugin to
// call GetInstanceObject. This is necessary to ensure that the properties
// the trusted plugin exposes (readyState and lastError) work properly. Note
// that untrusted NaCl apps are not allowed to provide PPP_InstancePrivate,
// so it's correct to never look up PPP_InstancePrivate for them.
//
// If this is *not* a NaCl plugin, original_module_ will never be set; we talk
// to the "real" module.
scoped_refptr<PluginModule> module = original_module_ ? original_module_ :
module_;
// Only check for the interface if the plugin has private permission.
if (!module_->permissions().HasPermission(ppapi::PERMISSION_PRIVATE))
if (!module->permissions().HasPermission(ppapi::PERMISSION_PRIVATE))
return false;
if (!plugin_private_interface_) {
plugin_private_interface_ = static_cast<const PPP_Instance_Private*>(
module_->GetPluginInterface(PPP_INSTANCE_PRIVATE_INTERFACE));
module->GetPluginInterface(PPP_INSTANCE_PRIVATE_INTERFACE));
}
return !!plugin_private_interface_;
......@@ -2666,10 +2676,6 @@ NPP PepperPluginInstanceImpl::instanceNPP() {
return npp_.get();
}
v8::Isolate* PepperPluginInstanceImpl::GetIsolate() const {
return isolate_;
}
PepperPluginInstance* PepperPluginInstance::Get(PP_Instance instance_id) {
return HostGlobals::Get()->GetInstance(instance_id);
}
......@@ -2682,6 +2688,10 @@ WebKit::WebPluginContainer* PepperPluginInstanceImpl::GetContainer() {
return container_;
}
v8::Isolate* PepperPluginInstanceImpl::GetIsolate() const {
return isolate_;
}
ppapi::VarTracker* PepperPluginInstanceImpl::GetVarTracker() {
return HostGlobals::Get()->GetVarTracker();
}
......
......@@ -345,6 +345,7 @@ class CONTENT_EXPORT PepperPluginInstanceImpl
// PluginInstance implementation
virtual RenderView* GetRenderView() OVERRIDE;
virtual WebKit::WebPluginContainer* GetContainer() OVERRIDE;
virtual v8::Isolate* GetIsolate() const OVERRIDE;
virtual ppapi::VarTracker* GetVarTracker() OVERRIDE;
virtual const GURL& GetPluginURL() OVERRIDE;
virtual base::FilePath GetModulePath() OVERRIDE;
......@@ -493,10 +494,6 @@ class CONTENT_EXPORT PepperPluginInstanceImpl
// itself when making NPObject scripting calls to WebBindings.
struct _NPP* instanceNPP();
// Returns the v8::Isolate that was current when this Instance was created.
// This is not inlined so as to avoid an unnecessary header include of v8.h.
v8::Isolate* GetIsolate() const;
// cc::TextureLayerClient implementation.
virtual unsigned PrepareTexture() OVERRIDE;
virtual bool PrepareTextureMailbox(
......
......@@ -24,6 +24,17 @@ enum PP_NaClError {
PP_NACL_MANIFEST_MISSING_ARCH = 0
};
/** Event types that NaCl may use when reporting load progress or errors. */
enum PP_NaClEventType {
PP_NACL_EVENT_LOADSTART,
PP_NACL_EVENT_PROGRESS,
PP_NACL_EVENT_ERROR,
PP_NACL_EVENT_ABORT,
PP_NACL_EVENT_LOAD,
PP_NACL_EVENT_LOADEND,
PP_NACL_EVENT_CRASH
};
/* PPB_NaCl_Private */
interface PPB_NaCl_Private {
/* Launches NaCl's sel_ldr process. Returns PP_EXTERNAL_PLUGIN_OK on success
......@@ -151,4 +162,15 @@ interface PPB_NaCl_Private {
[in] str_t file_url,
[out] uint64_t file_token_lo,
[out] uint64_t file_token_hi);
/* Dispatch a progress event on the DOM element where the given instance is
* embedded.
*/
void DispatchEvent([in] PP_Instance instance,
[in] PP_NaClEventType event_type,
[in] PP_Var resource_url,
[in] PP_Bool length_is_computable,
[in] uint64_t loaded_bytes,
[in] uint64_t total_bytes);
};
......@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
/* From private/ppb_nacl_private.idl modified Thu Oct 31 15:10:06 2013. */
/* From private/ppb_nacl_private.idl modified Tue Nov 5 15:33:53 2013. */
#ifndef PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_
#define PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_
......@@ -40,6 +40,17 @@ typedef enum {
*/
PP_NACL_MANIFEST_MISSING_ARCH = 0
} PP_NaClError;
/** Event types that NaCl may use when reporting load progress or errors. */
typedef enum {
PP_NACL_EVENT_LOADSTART,
PP_NACL_EVENT_PROGRESS,
PP_NACL_EVENT_ERROR,
PP_NACL_EVENT_ABORT,
PP_NACL_EVENT_LOAD,
PP_NACL_EVENT_LOADEND,
PP_NACL_EVENT_CRASH
} PP_NaClEventType;
/**
* @}
*/
......@@ -163,6 +174,15 @@ struct PPB_NaCl_Private_1_0 {
const char* file_url,
uint64_t* file_token_lo,
uint64_t* file_token_hi);
/* Dispatch a progress event on the DOM element where the given instance is
* embedded.
*/
void (*DispatchEvent)(PP_Instance instance,
PP_NaClEventType event_type,
struct PP_Var resource_url,
PP_Bool length_is_computable,
uint64_t loaded_bytes,
uint64_t total_bytes);
};
typedef struct PPB_NaCl_Private_1_0 PPB_NaCl_Private;
......
......@@ -559,20 +559,9 @@ char* Plugin::LookupArgument(const char* key) {
return NULL;
}
// Suggested names for progress event types, per
// http://www.w3.org/TR/progress-events/
const char* const Plugin::kProgressEventLoadStart = "loadstart";
const char* const Plugin::kProgressEventProgress = "progress";
const char* const Plugin::kProgressEventError = "error";
const char* const Plugin::kProgressEventAbort = "abort";
const char* const Plugin::kProgressEventLoad = "load";
const char* const Plugin::kProgressEventLoadEnd = "loadend";
// Define a NaCl specific event type for .nexe crashes.
const char* const Plugin::kProgressEventCrash = "crash";
class ProgressEvent {
public:
ProgressEvent(const char* event_type,
ProgressEvent(PP_NaClEventType event_type,
const nacl::string& url,
Plugin::LengthComputable length_computable,
uint64_t loaded_bytes,
......@@ -582,7 +571,7 @@ class ProgressEvent {
length_computable_(length_computable),
loaded_bytes_(loaded_bytes),
total_bytes_(total_bytes) { }
const char* event_type() const { return event_type_; }
PP_NaClEventType event_type() const { return event_type_; }
const char* url() const { return url_.c_str(); }
Plugin::LengthComputable length_computable() const {
return length_computable_;
......@@ -591,10 +580,7 @@ class ProgressEvent {
uint64_t total_bytes() const { return total_bytes_; }
private:
// event_type_ is always passed from a string literal, so ownership is
// not taken. Hence it does not need to be deleted when ProgressEvent is
// destroyed.
const char* event_type_;
PP_NaClEventType event_type_;
nacl::string url_;
Plugin::LengthComputable length_computable_;
uint64_t loaded_bytes_;
......@@ -869,7 +855,7 @@ void Plugin::NexeFileDidOpen(int32_t pp_error) {
static_cast<float>(nexe_downloader_.TimeSinceOpenMilliseconds()));
// Inform JavaScript that we successfully downloaded the nacl module.
EnqueueProgressEvent(kProgressEventProgress,
EnqueueProgressEvent(PP_NACL_EVENT_PROGRESS,
nexe_downloader_.url_to_open(),
LENGTH_IS_COMPUTABLE,
nexe_bytes_read,
......@@ -1046,7 +1032,7 @@ void Plugin::ReportDeadNexe() {
set_last_error_string(message);
AddToConsole(message);
EnqueueProgressEvent(kProgressEventCrash);
EnqueueProgressEvent(PP_NACL_EVENT_CRASH);
set_nexe_error_reported(true);
}
// else ReportLoadError() and ReportAbortError() will be used by loading code
......@@ -1180,7 +1166,7 @@ void Plugin::ProcessNaClManifest(const nacl::string& manifest_json) {
is_installed_ = GetUrlScheme(program_url) == SCHEME_CHROME_EXTENSION;
nacl_ready_state_ = LOADING;
// Inform JavaScript that we found a nexe URL to load.
EnqueueProgressEvent(kProgressEventProgress);
EnqueueProgressEvent(PP_NACL_EVENT_PROGRESS);
if (pnacl_options.translate()) {
pp::CompletionCallback translate_callback =
callback_factory_.NewCallback(&Plugin::BitcodeDidTranslate);
......@@ -1238,7 +1224,7 @@ void Plugin::RequestNaClManifest(const nacl::string& url) {
set_manifest_url(url);
// Inform JavaScript that a load is starting.
nacl_ready_state_ = OPENED;
EnqueueProgressEvent(kProgressEventLoadStart);
EnqueueProgressEvent(PP_NACL_EVENT_LOADSTART);
bool is_data_uri = GetUrlScheme(nmf_resolved_url.AsString()) == SCHEME_DATA;
HistogramEnumerateManifestIsDataURI(static_cast<int>(is_data_uri));
if (is_data_uri) {
......@@ -1360,9 +1346,9 @@ void Plugin::ReportLoadSuccess(LengthComputable length_computable,
// Inform JavaScript that loading was successful and is complete.
const nacl::string& url = nexe_downloader_.url_to_open();
EnqueueProgressEvent(
kProgressEventLoad, url, length_computable, loaded_bytes, total_bytes);
PP_NACL_EVENT_LOAD, url, length_computable, loaded_bytes, total_bytes);
EnqueueProgressEvent(
kProgressEventLoadEnd, url, length_computable, loaded_bytes, total_bytes);
PP_NACL_EVENT_LOADEND, url, length_computable, loaded_bytes, total_bytes);
// UMA
HistogramEnumerateLoadStatus(ERROR_LOAD_SUCCESS, is_installed_);
......@@ -1392,8 +1378,8 @@ void Plugin::ReportLoadError(const ErrorInfo& error_info) {
AddToConsole(nacl::string("NaCl module load failed: ") +
error_info.console_message());
// Inform JavaScript that loading encountered an error and is complete.
EnqueueProgressEvent(kProgressEventError);
EnqueueProgressEvent(kProgressEventLoadEnd);
EnqueueProgressEvent(PP_NACL_EVENT_ERROR);
EnqueueProgressEvent(PP_NACL_EVENT_LOADEND);
// UMA
HistogramEnumerateLoadStatus(error_info.error_code(), is_installed_);
......@@ -1410,8 +1396,8 @@ void Plugin::ReportLoadAbort() {
set_last_error_string(error_string);
AddToConsole(error_string);
// Inform JavaScript that loading was aborted and is complete.
EnqueueProgressEvent(kProgressEventAbort);
EnqueueProgressEvent(kProgressEventLoadEnd);
EnqueueProgressEvent(PP_NACL_EVENT_ABORT);
EnqueueProgressEvent(PP_NACL_EVENT_LOADEND);
// UMA
HistogramEnumerateLoadStatus(ERROR_LOAD_ABORTED, is_installed_);
......@@ -1444,7 +1430,7 @@ void Plugin::UpdateDownloadProgress(
LengthComputable length_computable = (total_bytes_to_be_received >= 0) ?
LENGTH_IS_COMPUTABLE : LENGTH_IS_NOT_COMPUTABLE;
plugin->EnqueueProgressEvent(kProgressEventProgress,
plugin->EnqueueProgressEvent(PP_NACL_EVENT_PROGRESS,
url,
length_computable,
bytes_received,
......@@ -1471,7 +1457,7 @@ const FileDownloader* Plugin::FindFileDownloader(
return file_downloader;
}
void Plugin::EnqueueProgressEvent(const char* event_type) {
void Plugin::EnqueueProgressEvent(PP_NaClEventType event_type) {
EnqueueProgressEvent(event_type,
NACL_NO_URL,
Plugin::LENGTH_IS_NOT_COMPUTABLE,
......@@ -1479,7 +1465,7 @@ void Plugin::EnqueueProgressEvent(const char* event_type) {
Plugin::kUnknownBytes);
}
void Plugin::EnqueueProgressEvent(const char* event_type,
void Plugin::EnqueueProgressEvent(PP_NaClEventType event_type,
const nacl::string& url,
LengthComputable length_computable,
uint64_t loaded_bytes,
......@@ -1525,63 +1511,21 @@ void Plugin::DispatchProgressEvent(int32_t result) {
nacl::scoped_ptr<ProgressEvent> event(progress_events_.front());
progress_events_.pop();
PLUGIN_PRINTF(("Plugin::DispatchProgressEvent ("
"event_type='%s', url='%s', length_computable=%d, "
"event_type='%d', url='%s', length_computable=%d, "
"loaded=%" NACL_PRIu64 ", total=%" NACL_PRIu64 ")\n",
event->event_type(),
static_cast<int>(event->event_type()),
event->url(),
static_cast<int>(event->length_computable()),
event->loaded_bytes(),
event->total_bytes()));
static const char* kEventClosureJS =
"(function(target, type, url,"
" lengthComputable, loadedBytes, totalBytes) {"
" var progress_event = new ProgressEvent(type, {"
" bubbles: false,"
" cancelable: true,"
" lengthComputable: lengthComputable,"
" loaded: loadedBytes,"
" total: totalBytes"
" });"
" progress_event.url = url;"
" target.dispatchEvent(progress_event);"
"})";
// Create a function object by evaluating the JavaScript text.
// TODO(sehr, polina): We should probably cache the created function object to
// avoid JavaScript reparsing.
pp::VarPrivate exception;
pp::VarPrivate function_object = ExecuteScript(kEventClosureJS, &exception);
if (!exception.is_undefined() || !function_object.is_object()) {
PLUGIN_PRINTF(("Plugin::DispatchProgressEvent:"
" Function object creation failed.\n"));
return;
}
// Get the target of the event to be dispatched.
pp::Var owner_element_object = GetOwnerElementObject();
if (!owner_element_object.is_object()) {
PLUGIN_PRINTF(("Plugin::DispatchProgressEvent:"
" Couldn't get owner element object.\n"));
NACL_NOTREACHED();
return;
}
pp::Var argv[6];
static const uint32_t argc = NACL_ARRAY_SIZE(argv);
argv[0] = owner_element_object;
argv[1] = pp::Var(event->event_type());
argv[2] = pp::Var(event->url());
argv[3] = pp::Var(event->length_computable() == LENGTH_IS_COMPUTABLE);
argv[4] = pp::Var(static_cast<double>(event->loaded_bytes()));
argv[5] = pp::Var(static_cast<double>(event->total_bytes()));
// Dispatch the event.
const pp::Var default_method;
function_object.Call(default_method, argc, argv, &exception);
if (!exception.is_undefined()) {
PLUGIN_PRINTF(("Plugin::DispatchProgressEvent:"
" event dispatch failed.\n"));
}
nacl_interface_->DispatchEvent(
pp_instance(),
event->event_type(),
pp::Var(event->url()).pp_var(),
event->length_computable() == LENGTH_IS_COMPUTABLE ? PP_TRUE : PP_FALSE,
event->loaded_bytes(),
event->total_bytes());
}
bool Plugin::OpenURLFast(const nacl::string& url,
......
......@@ -146,22 +146,13 @@ class Plugin : public pp::InstancePrivate {
// event (loadstart, progress, error, abort, load, loadend). Events are
// enqueued on the JavaScript event loop, which then calls back through
// DispatchProgressEvent.
void EnqueueProgressEvent(const char* event_type);
void EnqueueProgressEvent(const char* event_type,
void EnqueueProgressEvent(PP_NaClEventType event_type);
void EnqueueProgressEvent(PP_NaClEventType event_type,
const nacl::string& url,
LengthComputable length_computable,
uint64_t loaded_bytes,
uint64_t total_bytes);
// Progress event types.
static const char* const kProgressEventLoadStart;
static const char* const kProgressEventProgress;
static const char* const kProgressEventError;
static const char* const kProgressEventAbort;
static const char* const kProgressEventLoad;
static const char* const kProgressEventLoadEnd;
static const char* const kProgressEventCrash;
// Report the error code that sel_ldr produces when starting a nexe.
void ReportSelLdrLoadStatus(int status);
......
......@@ -344,7 +344,7 @@ void PnaclCoordinator::TranslateFinished(int32_t pp_error) {
// that were delayed (see the delay inserted in BitcodeGotCompiled).
if (ExpectedProgressKnown()) {
pexe_bytes_compiled_ = expected_pexe_size_;
plugin_->EnqueueProgressEvent(plugin::Plugin::kProgressEventProgress,
plugin_->EnqueueProgressEvent(PP_NACL_EVENT_PROGRESS,
pexe_url_,
plugin::Plugin::LENGTH_IS_COMPUTABLE,
pexe_bytes_compiled_,
......@@ -634,14 +634,14 @@ void PnaclCoordinator::BitcodeGotCompiled(int32_t pp_error,
// that bytes were sent to the compiler.
if (ExpectedProgressKnown()) {
if (!ShouldDelayProgressEvent()) {
plugin_->EnqueueProgressEvent(plugin::Plugin::kProgressEventProgress,
plugin_->EnqueueProgressEvent(PP_NACL_EVENT_PROGRESS,
pexe_url_,
plugin::Plugin::LENGTH_IS_COMPUTABLE,
pexe_bytes_compiled_,
expected_pexe_size_);
}
} else {
plugin_->EnqueueProgressEvent(plugin::Plugin::kProgressEventProgress,
plugin_->EnqueueProgressEvent(PP_NACL_EVENT_PROGRESS,
pexe_url_,
plugin::Plugin::LENGTH_IS_NOT_COMPUTABLE,
pexe_bytes_compiled_,
......
......@@ -3098,6 +3098,11 @@ static PP_FileHandle Pnacl_M25_PPB_NaCl_Private_OpenNaClExecutable(PP_Instance i
return iface->OpenNaClExecutable(instance, file_url, file_token_lo, file_token_hi);
}
static void Pnacl_M25_PPB_NaCl_Private_DispatchEvent(PP_Instance instance, PP_NaClEventType event_type, struct PP_Var* resource_url, PP_Bool length_is_computable, uint64_t loaded_bytes, uint64_t total_bytes) {
const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_1_0.real_iface;
iface->DispatchEvent(instance, event_type, *resource_url, length_is_computable, loaded_bytes, total_bytes);
}
/* End wrapper methods for PPB_NaCl_Private_1_0 */
/* Begin wrapper methods for PPB_NetAddress_Private_0_1 */
......@@ -4945,7 +4950,8 @@ struct PPB_NaCl_Private_1_0 Pnacl_Wrappers_PPB_NaCl_Private_1_0 = {
.ReportTranslationFinished = (void (*)(PP_Instance instance, PP_Bool success))&Pnacl_M25_PPB_NaCl_Private_ReportTranslationFinished,
.IsOffTheRecord = (PP_Bool (*)(void))&Pnacl_M25_PPB_NaCl_Private_IsOffTheRecord,
.ReportNaClError = (PP_ExternalPluginResult (*)(PP_Instance instance, PP_NaClError message_id))&Pnacl_M25_PPB_NaCl_Private_ReportNaClError,
.OpenNaClExecutable = (PP_FileHandle (*)(PP_Instance instance, const char* file_url, uint64_t* file_token_lo, uint64_t* file_token_hi))&Pnacl_M25_PPB_NaCl_Private_OpenNaClExecutable
.OpenNaClExecutable = (PP_FileHandle (*)(PP_Instance instance, const char* file_url, uint64_t* file_token_lo, uint64_t* file_token_hi))&Pnacl_M25_PPB_NaCl_Private_OpenNaClExecutable,
.DispatchEvent = (void (*)(PP_Instance instance, PP_NaClEventType event_type, struct PP_Var resource_url, PP_Bool length_is_computable, uint64_t loaded_bytes, uint64_t total_bytes))&Pnacl_M25_PPB_NaCl_Private_DispatchEvent
};
struct PPB_NetAddress_Private_0_1 Pnacl_Wrappers_PPB_NetAddress_Private_0_1 = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment