Commit 609c9c9f authored by teravest@chromium.org's avatar teravest@chromium.org

Pepper: Clean up ProgressEvent logic.

This simplifies NexeLoadManager, which is getting pretty big. This also removes
an unused field from ProgressEvent, and adds a convenience function for posting
a task to dispatch a progress event from the main thread, which is often
necessary to ensure that progress events are posted to the DOM after other
state changes.

Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=269362

R=dmichael@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269784 0039d316-1c4b-4281-b951-d872f2087c98
parent 6c38b345
...@@ -167,6 +167,8 @@ ...@@ -167,6 +167,8 @@
'nacl/renderer/pnacl_translation_resource_host.h', 'nacl/renderer/pnacl_translation_resource_host.h',
'nacl/renderer/ppb_nacl_private_impl.cc', 'nacl/renderer/ppb_nacl_private_impl.cc',
'nacl/renderer/ppb_nacl_private_impl.h', 'nacl/renderer/ppb_nacl_private_impl.h',
'nacl/renderer/progress_event.cc',
'nacl/renderer/progress_event.h',
'nacl/renderer/sandbox_arch.cc', 'nacl/renderer/sandbox_arch.cc',
'nacl/renderer/sandbox_arch.h', 'nacl/renderer/sandbox_arch.h',
'nacl/renderer/trusted_plugin_channel.cc', 'nacl/renderer/trusted_plugin_channel.cc',
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include "components/nacl/renderer/histogram.h" #include "components/nacl/renderer/histogram.h"
#include "components/nacl/renderer/manifest_service_channel.h" #include "components/nacl/renderer/manifest_service_channel.h"
#include "components/nacl/renderer/pnacl_translation_resource_host.h" #include "components/nacl/renderer/pnacl_translation_resource_host.h"
#include "components/nacl/renderer/progress_event.h"
#include "components/nacl/renderer/sandbox_arch.h" #include "components/nacl/renderer/sandbox_arch.h"
#include "components/nacl/renderer/trusted_plugin_channel.h" #include "components/nacl/renderer/trusted_plugin_channel.h"
#include "content/public/common/content_client.h" #include "content/public/common/content_client.h"
...@@ -33,10 +34,8 @@ ...@@ -33,10 +34,8 @@
#include "ppapi/shared_impl/var.h" #include "ppapi/shared_impl/var.h"
#include "ppapi/shared_impl/var_tracker.h" #include "ppapi/shared_impl/var_tracker.h"
#include "ppapi/thunk/enter.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/WebDocument.h"
#include "third_party/WebKit/public/web/WebElement.h" #include "third_party/WebKit/public/web/WebElement.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
#include "third_party/WebKit/public/web/WebPluginContainer.h" #include "third_party/WebKit/public/web/WebPluginContainer.h"
#include "third_party/WebKit/public/web/WebView.h" #include "third_party/WebKit/public/web/WebView.h"
#include "v8/include/v8.h" #include "v8/include/v8.h"
...@@ -60,27 +59,6 @@ const char* const kDevAttribute = "@dev"; ...@@ -60,27 +59,6 @@ const char* const kDevAttribute = "@dev";
const char* const kNaClMIMEType = "application/x-nacl"; const char* const kNaClMIMEType = "application/x-nacl";
const char* const kPNaClMIMEType = "application/x-pnacl"; const char* const kPNaClMIMEType = "application/x-pnacl";
blink::WebString EventTypeToString(PP_NaClEventType event_type) {
switch (event_type) {
case PP_NACL_EVENT_LOADSTART:
return blink::WebString::fromUTF8("loadstart");
case PP_NACL_EVENT_PROGRESS:
return blink::WebString::fromUTF8("progress");
case PP_NACL_EVENT_ERROR:
return blink::WebString::fromUTF8("error");
case PP_NACL_EVENT_ABORT:
return blink::WebString::fromUTF8("abort");
case PP_NACL_EVENT_LOAD:
return blink::WebString::fromUTF8("load");
case PP_NACL_EVENT_LOADEND:
return blink::WebString::fromUTF8("loadend");
case PP_NACL_EVENT_CRASH:
return blink::WebString::fromUTF8("crash");
}
NOTIMPLEMENTED();
return blink::WebString();
}
static int GetRoutingID(PP_Instance instance) { static int GetRoutingID(PP_Instance instance) {
// Check that we are on the main renderer thread. // Check that we are on the main renderer thread.
DCHECK(content::RenderThread::Get()); DCHECK(content::RenderThread::Get());
...@@ -168,14 +146,9 @@ void NexeLoadManager::NexeFileDidOpen(int32_t pp_error, ...@@ -168,14 +146,9 @@ void NexeLoadManager::NexeFileDidOpen(int32_t pp_error,
nexe_size_); nexe_size_);
// Inform JavaScript that we successfully downloaded the nacl module. // Inform JavaScript that we successfully downloaded the nacl module.
ProgressEvent progress_event(pp_instance_, PP_NACL_EVENT_PROGRESS, url, ProgressEvent progress_event(PP_NACL_EVENT_PROGRESS, url, true, nexe_size_,
true, nexe_size_, nexe_size_); nexe_size_);
ppapi::PpapiGlobals::Get()->GetMainThreadMessageLoop()->PostTask( DispatchProgressEvent(pp_instance_, progress_event);
FROM_HERE,
base::Bind(&NexeLoadManager::DispatchEvent,
weak_factory_.GetWeakPtr(),
progress_event));
load_start_ = base::Time::Now(); load_start_ = base::Time::Now();
} }
} }
...@@ -197,21 +170,13 @@ void NexeLoadManager::ReportLoadSuccess(const std::string& url, ...@@ -197,21 +170,13 @@ void NexeLoadManager::ReportLoadSuccess(const std::string& url,
set_nacl_ready_state(PP_NACL_READY_STATE_DONE); set_nacl_ready_state(PP_NACL_READY_STATE_DONE);
// Inform JavaScript that loading was successful and is complete. // Inform JavaScript that loading was successful and is complete.
ProgressEvent load_event(pp_instance_, PP_NACL_EVENT_LOAD, url, true, ProgressEvent load_event(PP_NACL_EVENT_LOAD, url, true, loaded_bytes,
loaded_bytes, total_bytes); total_bytes);
ppapi::PpapiGlobals::Get()->GetMainThreadMessageLoop()->PostTask( DispatchProgressEvent(pp_instance_, load_event);
FROM_HERE,
base::Bind(&NexeLoadManager::DispatchEvent, ProgressEvent loadend_event(PP_NACL_EVENT_LOADEND, url, true, loaded_bytes,
weak_factory_.GetWeakPtr(), total_bytes);
load_event)); DispatchProgressEvent(pp_instance_, loadend_event);
ProgressEvent loadend_event(pp_instance_, PP_NACL_EVENT_LOADEND, url, true,
loaded_bytes, total_bytes);
ppapi::PpapiGlobals::Get()->GetMainThreadMessageLoop()->PostTask(
FROM_HERE,
base::Bind(&NexeLoadManager::DispatchEvent,
weak_factory_.GetWeakPtr(),
loadend_event));
// UMA // UMA
HistogramEnumerateLoadStatus(PP_NACL_ERROR_LOAD_SUCCESS, is_installed_); HistogramEnumerateLoadStatus(PP_NACL_ERROR_LOAD_SUCCESS, is_installed_);
...@@ -245,17 +210,8 @@ void NexeLoadManager::ReportLoadError(PP_NaClError error, ...@@ -245,17 +210,8 @@ void NexeLoadManager::ReportLoadError(PP_NaClError error,
SetLastError(error_string); SetLastError(error_string);
// Inform JavaScript that loading encountered an error and is complete. // Inform JavaScript that loading encountered an error and is complete.
ppapi::PpapiGlobals::Get()->GetMainThreadMessageLoop()->PostTask( DispatchProgressEvent(pp_instance_, ProgressEvent(PP_NACL_EVENT_ERROR));
FROM_HERE, DispatchProgressEvent(pp_instance_, ProgressEvent(PP_NACL_EVENT_LOADEND));
base::Bind(&NexeLoadManager::DispatchEvent,
weak_factory_.GetWeakPtr(),
ProgressEvent(PP_NACL_EVENT_ERROR)));
ppapi::PpapiGlobals::Get()->GetMainThreadMessageLoop()->PostTask(
FROM_HERE,
base::Bind(&NexeLoadManager::DispatchEvent,
weak_factory_.GetWeakPtr(),
ProgressEvent(PP_NACL_EVENT_LOADEND)));
HistogramEnumerateLoadStatus(error, is_installed_); HistogramEnumerateLoadStatus(error, is_installed_);
LogToConsole(console_message); LogToConsole(console_message);
...@@ -274,17 +230,8 @@ void NexeLoadManager::ReportLoadAbort() { ...@@ -274,17 +230,8 @@ void NexeLoadManager::ReportLoadAbort() {
SetLastError(error_string); SetLastError(error_string);
// Inform JavaScript that loading was aborted and is complete. // Inform JavaScript that loading was aborted and is complete.
ppapi::PpapiGlobals::Get()->GetMainThreadMessageLoop()->PostTask( DispatchProgressEvent(pp_instance_, ProgressEvent(PP_NACL_EVENT_ABORT));
FROM_HERE, DispatchProgressEvent(pp_instance_, ProgressEvent(PP_NACL_EVENT_LOADEND));
base::Bind(&NexeLoadManager::DispatchEvent,
weak_factory_.GetWeakPtr(),
ProgressEvent(PP_NACL_EVENT_ABORT)));
ppapi::PpapiGlobals::Get()->GetMainThreadMessageLoop()->PostTask(
FROM_HERE,
base::Bind(&NexeLoadManager::DispatchEvent,
weak_factory_.GetWeakPtr(),
ProgressEvent(PP_NACL_EVENT_LOADEND)));
HistogramEnumerateLoadStatus(PP_NACL_ERROR_LOAD_ABORTED, is_installed_); HistogramEnumerateLoadStatus(PP_NACL_ERROR_LOAD_ABORTED, is_installed_);
LogToConsole(error_string); LogToConsole(error_string);
...@@ -321,43 +268,6 @@ void NexeLoadManager::NexeDidCrash(const char* crash_log) { ...@@ -321,43 +268,6 @@ void NexeLoadManager::NexeDidCrash(const char* crash_log) {
CopyCrashLogToJsConsole(crash_log); CopyCrashLogToJsConsole(crash_log);
} }
void NexeLoadManager::DispatchEvent(const ProgressEvent &event) {
blink::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;
blink::WebLocalFrame* 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);
if (!event.resource_url.empty()) {
blink::WebString url_string = blink::WebString::fromUTF8(
event.resource_url.data(), event.resource_url.size());
blink::WebDOMResourceProgressEvent blink_event(
EventTypeToString(event.event_type),
event.length_is_computable,
event.loaded_bytes,
event.total_bytes,
url_string);
container->element().dispatchEvent(blink_event);
} else {
blink::WebDOMProgressEvent blink_event(EventTypeToString(event.event_type),
event.length_is_computable,
event.loaded_bytes,
event.total_bytes);
container->element().dispatchEvent(blink_event);
}
}
void NexeLoadManager::set_trusted_plugin_channel( void NexeLoadManager::set_trusted_plugin_channel(
scoped_ptr<TrustedPluginChannel> channel) { scoped_ptr<TrustedPluginChannel> channel) {
trusted_plugin_channel_ = channel.Pass(); trusted_plugin_channel_ = channel.Pass();
...@@ -438,11 +348,8 @@ bool NexeLoadManager::RequestNaClManifest(const std::string& url, ...@@ -438,11 +348,8 @@ bool NexeLoadManager::RequestNaClManifest(const std::string& url,
HistogramEnumerateManifestIsDataURI(*is_data_uri); HistogramEnumerateManifestIsDataURI(*is_data_uri);
set_nacl_ready_state(PP_NACL_READY_STATE_OPENED); set_nacl_ready_state(PP_NACL_READY_STATE_OPENED);
ppapi::PpapiGlobals::Get()->GetMainThreadMessageLoop()->PostTask( DispatchProgressEvent(pp_instance_,
FROM_HERE, ProgressEvent(PP_NACL_EVENT_LOADSTART));
base::Bind(&NexeLoadManager::DispatchEvent,
weak_factory_.GetWeakPtr(),
ProgressEvent(PP_NACL_EVENT_LOADSTART)));
return true; return true;
} }
} }
...@@ -459,11 +366,7 @@ void NexeLoadManager::ProcessNaClManifest(const std::string& program_url) { ...@@ -459,11 +366,7 @@ void NexeLoadManager::ProcessNaClManifest(const std::string& program_url) {
if (gurl.is_valid()) if (gurl.is_valid())
is_installed_ = gurl.SchemeIs("chrome-extension"); is_installed_ = gurl.SchemeIs("chrome-extension");
set_nacl_ready_state(PP_NACL_READY_STATE_LOADING); set_nacl_ready_state(PP_NACL_READY_STATE_LOADING);
ppapi::PpapiGlobals::Get()->GetMainThreadMessageLoop()->PostTask( DispatchProgressEvent(pp_instance_, ProgressEvent(PP_NACL_EVENT_PROGRESS));
FROM_HERE,
base::Bind(&NexeLoadManager::DispatchEvent,
weak_factory_.GetWeakPtr(),
ProgressEvent(PP_NACL_EVENT_PROGRESS)));
} }
std::string NexeLoadManager::GetManifestURLArgument() const { std::string NexeLoadManager::GetManifestURLArgument() const {
...@@ -514,11 +417,7 @@ void NexeLoadManager::ReportDeadNexe() { ...@@ -514,11 +417,7 @@ void NexeLoadManager::ReportDeadNexe() {
SetLastError(message); SetLastError(message);
LogToConsole(message); LogToConsole(message);
ppapi::PpapiGlobals::Get()->GetMainThreadMessageLoop()->PostTask( DispatchProgressEvent(pp_instance_, ProgressEvent(PP_NACL_EVENT_CRASH));
FROM_HERE,
base::Bind(&NexeLoadManager::DispatchEvent,
weak_factory_.GetWeakPtr(),
ProgressEvent(PP_NACL_EVENT_CRASH)));
nexe_error_reported_ = true; nexe_error_reported_ = true;
} }
// else ReportLoadError() and ReportLoadAbort() will be used by loading code // else ReportLoadError() and ReportLoadAbort() will be used by loading code
......
...@@ -52,31 +52,6 @@ class NexeLoadManager { ...@@ -52,31 +52,6 @@ class NexeLoadManager {
// The intent is for this class to only expose functions for reporting a // The intent is for this class to only expose functions for reporting a
// load state transition (e.g., ReportLoadError, ReportProgress, // load state transition (e.g., ReportLoadError, ReportProgress,
// ReportLoadAbort, etc.) // ReportLoadAbort, etc.)
struct ProgressEvent {
explicit ProgressEvent(PP_NaClEventType event_type_param)
: event_type(event_type_param),
length_is_computable(false),
loaded_bytes(0),
total_bytes(0) {
}
ProgressEvent(PP_Instance instance, PP_NaClEventType event_type,
const std::string& resource_url, bool length_is_computable,
uint64_t loaded_bytes, uint64_t total_bytes)
: instance(instance),
event_type(event_type),
resource_url(resource_url),
length_is_computable(length_is_computable),
loaded_bytes(loaded_bytes),
total_bytes(total_bytes) {
}
PP_Instance instance;
PP_NaClEventType event_type;
std::string resource_url;
bool length_is_computable;
uint64_t loaded_bytes;
uint64_t total_bytes;
};
void DispatchEvent(const ProgressEvent &event);
void set_trusted_plugin_channel(scoped_ptr<TrustedPluginChannel> channel); void set_trusted_plugin_channel(scoped_ptr<TrustedPluginChannel> channel);
void set_manifest_service_channel( void set_manifest_service_channel(
scoped_ptr<ManifestServiceChannel> channel); scoped_ptr<ManifestServiceChannel> channel);
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "components/nacl/renderer/manifest_service_channel.h" #include "components/nacl/renderer/manifest_service_channel.h"
#include "components/nacl/renderer/nexe_load_manager.h" #include "components/nacl/renderer/nexe_load_manager.h"
#include "components/nacl/renderer/pnacl_translation_resource_host.h" #include "components/nacl/renderer/pnacl_translation_resource_host.h"
#include "components/nacl/renderer/progress_event.h"
#include "components/nacl/renderer/sandbox_arch.h" #include "components/nacl/renderer/sandbox_arch.h"
#include "components/nacl/renderer/trusted_plugin_channel.h" #include "components/nacl/renderer/trusted_plugin_channel.h"
#include "content/public/common/content_client.h" #include "content/public/common/content_client.h"
...@@ -654,48 +655,18 @@ PP_FileHandle OpenNaClExecutable(PP_Instance instance, ...@@ -654,48 +655,18 @@ PP_FileHandle OpenNaClExecutable(PP_Instance instance,
return handle; return handle;
} }
void DispatchEventOnMainThread(PP_Instance instance,
PP_NaClEventType event_type,
const std::string& resource_url,
PP_Bool length_is_computable,
uint64_t loaded_bytes,
uint64_t total_bytes);
void DispatchEvent(PP_Instance instance, void DispatchEvent(PP_Instance instance,
PP_NaClEventType event_type, PP_NaClEventType event_type,
const char *resource_url, const char *resource_url,
PP_Bool length_is_computable, PP_Bool length_is_computable,
uint64_t loaded_bytes, uint64_t loaded_bytes,
uint64_t total_bytes) { uint64_t total_bytes) {
ppapi::PpapiGlobals::Get()->GetMainThreadMessageLoop()->PostTask( ProgressEvent event(event_type,
FROM_HERE, resource_url,
base::Bind(&DispatchEventOnMainThread, PP_ToBool(length_is_computable),
instance, loaded_bytes,
event_type, total_bytes);
std::string(resource_url), DispatchProgressEvent(instance, event);
length_is_computable,
loaded_bytes,
total_bytes));
}
void DispatchEventOnMainThread(PP_Instance instance,
PP_NaClEventType event_type,
const std::string& resource_url,
PP_Bool length_is_computable,
uint64_t loaded_bytes,
uint64_t total_bytes) {
NexeLoadManager* load_manager =
GetNexeLoadManager(instance);
// The instance may have been destroyed after we were scheduled, so do
// nothing if it's gone.
if (load_manager) {
NexeLoadManager::ProgressEvent event(event_type);
event.resource_url = resource_url;
event.length_is_computable = PP_ToBool(length_is_computable);
event.loaded_bytes = loaded_bytes;
event.total_bytes = total_bytes;
load_manager->DispatchEvent(event);
}
} }
void NexeFileDidOpen(PP_Instance instance, void NexeFileDidOpen(PP_Instance instance,
......
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/nacl/renderer/progress_event.h"
#include "base/bind.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/message_loop/message_loop_proxy.h"
#include "content/public/renderer/pepper_plugin_instance.h"
#include "ppapi/c/private/ppb_nacl_private.h"
#include "ppapi/shared_impl/ppapi_globals.h"
#include "third_party/WebKit/public/platform/WebString.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/WebLocalFrame.h"
#include "third_party/WebKit/public/web/WebPluginContainer.h"
#include "v8/include/v8.h"
namespace nacl {
namespace {
blink::WebString EventTypeToString(PP_NaClEventType event_type) {
switch (event_type) {
case PP_NACL_EVENT_LOADSTART:
return blink::WebString::fromUTF8("loadstart");
case PP_NACL_EVENT_PROGRESS:
return blink::WebString::fromUTF8("progress");
case PP_NACL_EVENT_ERROR:
return blink::WebString::fromUTF8("error");
case PP_NACL_EVENT_ABORT:
return blink::WebString::fromUTF8("abort");
case PP_NACL_EVENT_LOAD:
return blink::WebString::fromUTF8("load");
case PP_NACL_EVENT_LOADEND:
return blink::WebString::fromUTF8("loadend");
case PP_NACL_EVENT_CRASH:
return blink::WebString::fromUTF8("crash");
}
NOTIMPLEMENTED();
return blink::WebString();
}
void DispatchProgressEventOnMainThread(PP_Instance instance,
const ProgressEvent &event) {
content::PepperPluginInstance* plugin_instance =
content::PepperPluginInstance::Get(instance);
if (!plugin_instance)
return;
blink::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;
blink::WebLocalFrame* 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);
if (!event.resource_url.empty()) {
blink::WebString url_string = blink::WebString::fromUTF8(
event.resource_url.data(), event.resource_url.size());
blink::WebDOMResourceProgressEvent blink_event(
EventTypeToString(event.event_type),
event.length_is_computable,
event.loaded_bytes,
event.total_bytes,
url_string);
container->element().dispatchEvent(blink_event);
} else {
blink::WebDOMProgressEvent blink_event(EventTypeToString(event.event_type),
event.length_is_computable,
event.loaded_bytes,
event.total_bytes);
container->element().dispatchEvent(blink_event);
}
}
} // namespace
void DispatchProgressEvent(PP_Instance instance, const ProgressEvent &event) {
ppapi::PpapiGlobals::Get()->GetMainThreadMessageLoop()->PostTask(
FROM_HERE,
base::Bind(&DispatchProgressEventOnMainThread, instance, event));
}
} // namespace nacl
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef COMPONENTS_NACL_RENDERER_NEXE_PROGRESS_EVENT_H_
#define COMPONENTS_NACL_RENDERER_NEXE_PROGRESS_EVENT_H_
#include <string>
#include "ppapi/c/pp_instance.h"
#include "ppapi/c/private/ppb_nacl_private.h"
namespace nacl {
// See http://www.w3.org/TR/progress-events/ for more details on progress
// events.
struct ProgressEvent {
explicit ProgressEvent(PP_NaClEventType event_type_param)
: event_type(event_type_param),
length_is_computable(false),
loaded_bytes(0),
total_bytes(0) {
}
ProgressEvent(PP_NaClEventType event_type_param,
const std::string& resource_url_param,
bool length_is_computable_param,
uint64_t loaded_bytes_param,
uint64_t total_bytes_param)
: event_type(event_type_param),
resource_url(resource_url_param),
length_is_computable(length_is_computable_param),
loaded_bytes(loaded_bytes_param),
total_bytes(total_bytes_param) {
}
PP_NaClEventType event_type;
std::string resource_url;
bool length_is_computable;
uint64_t loaded_bytes;
uint64_t total_bytes;
};
// Dispatches a progress event to the DOM frame corresponding to the specified
// plugin instance.
// This posts a task to the main thread to perform the actual dispatch, since
// it's usually intended for progress events to be dispatched after all other
// state changes are handled.
void DispatchProgressEvent(PP_Instance instance, const ProgressEvent& event);
} // namespace nacl
#endif // COMPONENTS_NACL_RENDERER_NEXE_PROGRESS_EVENT_H_
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