summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy/callback_tracker.h
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-03 03:13:01 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-03 03:13:01 +0000
commit1a4d9cb51c770cc70f1eba7c7b07bcf45baade6d (patch)
treebe769022c3a43f3bf0e84c3aa9e3ad15c8cd5a57 /ppapi/proxy/callback_tracker.h
parent4bcab1c571c6b11a51e4493e3387733a6c95bbac (diff)
downloadchromium_src-1a4d9cb51c770cc70f1eba7c7b07bcf45baade6d.zip
chromium_src-1a4d9cb51c770cc70f1eba7c7b07bcf45baade6d.tar.gz
chromium_src-1a4d9cb51c770cc70f1eba7c7b07bcf45baade6d.tar.bz2
Revert PPAPI proxy change with too many files in it.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64870 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/callback_tracker.h')
-rw-r--r--ppapi/proxy/callback_tracker.h66
1 files changed, 0 insertions, 66 deletions
diff --git a/ppapi/proxy/callback_tracker.h b/ppapi/proxy/callback_tracker.h
deleted file mode 100644
index 5f8233c1..0000000
--- a/ppapi/proxy/callback_tracker.h
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (c) 2010 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 PPAPI_PROXY_CALLBACK_TRACKER_H_
-#define PPAPI_PROXY_CALLBACK_TRACKER_H_
-
-#include <map>
-
-#include "ppapi/c/pp_completion_callback.h"
-#include "ppapi/c/pp_stdint.h"
-
-namespace pp {
-namespace proxy {
-
-class Dispatcher;
-
-// This object tracks cross-process callbacks. When the plugin sends a callback
-// object to the renderer, we save the information and pass an identifier
-// instead.
-//
-// On the renderer side, this identifier is converted to a new callback in that
-// process. When executed, this new callback sends an IPC message containing the
-// previous identifier back to the plugin.
-//
-// When we receive that message, ExecuteSerializedCallback converts the
-// identifier back to the original callback information and runs the callback.
-class CallbackTracker {
- public:
- CallbackTracker(Dispatcher* dispatcher);
- ~CallbackTracker();
-
- // Converts the given callback in the context of the plugin to a serialized
- // ID. This will be passed to ReceiveCallback on the renderer side.
- uint32_t SendCallback(PP_CompletionCallback callback);
-
- // Converts the given serialized callback ID to a new completion callback in
- // the context of the current process. This callback actually will represent
- // a proxy that will execute the callback in the plugin process.
- PP_CompletionCallback ReceiveCallback(uint32_t serialized_callback);
-
- // Sends a request to the remote process to execute the given callback.
- void SendExecuteSerializedCallback(uint32_t serialized_callback,
- int32_t param);
-
- // Executes the given callback ID with the given result in the current
- // process. This will also destroy the information associated with the
- // callback and the serialized ID won't be valid any more.
- void ReceiveExecuteSerializedCallback(uint32_t serialized_callback,
- int32_t param);
-
- private:
- // Pointer to the dispatcher that owns us.
- Dispatcher* dispatcher_;
-
- int32_t next_callback_id_;
-
- // Maps callback IDs to the actual callback objects in the plugin process.
- typedef std::map<int32_t, PP_CompletionCallback> CallbackMap;
- CallbackMap callback_map_;
-};
-
-} // namespace proxy
-} // namespace pp
-
-#endif // PPAPI_PROXY_CALLBACK_TRACKER_H_