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

Unified Diff: ppapi/thunk/enter.h

Issue 7082036: Convert more interfaces to the new thunk system. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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/thunk/enter.h
===================================================================
--- ppapi/thunk/enter.h (revision 87260)
+++ ppapi/thunk/enter.h (working copy)
@@ -52,9 +52,11 @@
bool succeeded() const { return !!functions_; }
bool failed() const { return !functions_; }
+ PP_Instance instance() const { return instance_; }
FunctionsT* functions() { return functions_; }
private:
+ PP_Instance instance_;
FunctionsT* functions_;
DISALLOW_COPY_AND_ASSIGN(EnterFunction);
@@ -71,6 +73,20 @@
}
};
+// Used when a caller has a resource, and wants to do EnterFunction for the
+// instance corresponding to that resource.
+template<typename FunctionsT>
+class EnterFunctionGivenResource : public EnterFunction<FunctionsT> {
+ public:
+ EnterFunctionGivenResource(PP_Resource resource, bool report_error)
+ : EnterFunction<FunctionsT>(
+ TrackerBase::Get()->GetInstanceForResource(resource),
+ report_error) {
+ }
+};
+
+// EnterResource ---------------------------------------------------------------
+
template<typename ResourceT>
class EnterResource {
public:

Powered by Google App Engine
This is Rietveld 408576698