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

Unified Diff: ppapi/proxy/enter_proxy.h

Issue 9728001: Make the file chooser use PP_ArrayOutput (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: ppapi/proxy/enter_proxy.h
diff --git a/ppapi/proxy/enter_proxy.h b/ppapi/proxy/enter_proxy.h
index 5306a80afea871c45a98396444798eadf396b8b2..86ee7a0f0fd80d8a518a78c323186f7ffe0cc16d 100644
--- a/ppapi/proxy/enter_proxy.h
+++ b/ppapi/proxy/enter_proxy.h
@@ -89,6 +89,14 @@ template<typename ResourceT>
class EnterHostFromHostResourceForceCallback
: public EnterHostFromHostResource<ResourceT> {
public:
+ EnterHostFromHostResourceForceCallback(
+ const HostResource& host_resource,
+ const pp::CompletionCallback& callback)
+ : EnterHostFromHostResource<ResourceT>(host_resource),
+ needs_running_(true),
+ callback_(callback) {
+ }
+
// For callbacks that take no parameters except the "int32_t result". Most
// implementations will use the 1-extra-argument constructor below.
template<class CallbackFactory, typename Method>
@@ -168,42 +176,12 @@ template<typename FunctionT>
class EnterHostFunctionForceCallback
: public thunk::EnterFunctionNoLock<FunctionT> {
public:
- // For callbacks that take no parameters except the "int32_t result". Most
- // implementations will use the 1-extra-argument constructor below.
- template<class CallbackFactory, typename Method>
- EnterHostFunctionForceCallback(PP_Instance instance,
- CallbackFactory& factory,
- Method method)
+ EnterHostFunctionForceCallback(
+ PP_Instance instance,
+ const pp::CompletionCallback& callback)
: thunk::EnterFunctionNoLock<FunctionT>(instance, false),
needs_running_(true),
- callback_(factory.NewOptionalCallback(method)) {
- if (this->failed())
- RunCallback(PP_ERROR_BADARGUMENT);
- }
-
- // For callbacks that take an extra parameter as a closure.
- template<class CallbackFactory, typename Method, typename A>
- EnterHostFunctionForceCallback(PP_Instance instance,
- CallbackFactory& factory,
- Method method,
- const A& a)
- : thunk::EnterFunctionNoLock<FunctionT>(instance, false),
- needs_running_(true),
- callback_(factory.NewOptionalCallback(method, a)) {
- if (this->failed())
- RunCallback(PP_ERROR_BADARGUMENT);
- }
-
- // For callbacks that take two extra parameters as a closure.
- template<class CallbackFactory, typename Method, typename A, typename B>
- EnterHostFunctionForceCallback(PP_Instance instance,
- CallbackFactory& factory,
- Method method,
- const A& a,
- const B& b)
- : thunk::EnterFunctionNoLock<FunctionT>(instance),
- needs_running_(true),
- callback_(factory.NewOptionalCallback(method, a, b)) {
+ callback_(callback) {
if (this->failed())
RunCallback(PP_ERROR_BADARGUMENT);
}

Powered by Google App Engine
This is Rietveld 408576698