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

Unified Diff: ppapi/proxy/enter_proxy.h

Issue 10168026: Delete FunctionGroupBase from Pepper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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
« no previous file with comments | « ppapi/ppapi_shared.gypi ('k') | ppapi/proxy/host_dispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/enter_proxy.h
diff --git a/ppapi/proxy/enter_proxy.h b/ppapi/proxy/enter_proxy.h
index 86ee7a0f0fd80d8a518a78c323186f7ffe0cc16d..6ee93a386a06f425c032dc8e16eb821c8c321cc7 100644
--- a/ppapi/proxy/enter_proxy.h
+++ b/ppapi/proxy/enter_proxy.h
@@ -170,52 +170,6 @@ class EnterHostFromHostResourceForceCallback
pp::CompletionCallback callback_;
};
-// Like EnterHostFromHostResourceForceCallback but for Function APIs. It takes
-// an instance instead of a resource ID.
-template<typename FunctionT>
-class EnterHostFunctionForceCallback
- : public thunk::EnterFunctionNoLock<FunctionT> {
- public:
- EnterHostFunctionForceCallback(
- PP_Instance instance,
- const pp::CompletionCallback& callback)
- : thunk::EnterFunctionNoLock<FunctionT>(instance, false),
- needs_running_(true),
- callback_(callback) {
- if (this->failed())
- RunCallback(PP_ERROR_BADARGUMENT);
- }
-
- ~EnterHostFunctionForceCallback() {
- if (needs_running_) {
- NOTREACHED() << "Should always call SetResult except in the "
- "initialization failed case.";
- RunCallback(PP_ERROR_FAILED);
- }
- }
-
- void SetResult(int32_t result) {
- DCHECK(needs_running_) << "Don't call SetResult when there already is one.";
- needs_running_ = false;
- if (result != PP_OK_COMPLETIONPENDING)
- callback_.Run(result);
- }
-
- PP_CompletionCallback callback() {
- return callback_.pp_completion_callback();
- }
-
- private:
- void RunCallback(int32_t result) {
- DCHECK(needs_running_);
- needs_running_ = false;
- callback_.Run(result);
- }
-
- bool needs_running_;
- pp::CompletionCallback callback_;
-};
-
} // namespace proxy
} // namespace ppapi
« no previous file with comments | « ppapi/ppapi_shared.gypi ('k') | ppapi/proxy/host_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698