summaryrefslogtreecommitdiffstats
path: root/ppapi/thunk/thunk.h
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-06 22:55:47 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-06 22:55:47 +0000
commit6239d34076222cbfe1d42770c604822b0ba894f4 (patch)
treed873cdf138b002bb2d2d4a554ba4fcd210251760 /ppapi/thunk/thunk.h
parentc50a948dd9c07a71524949a28a5347e11d80da47 (diff)
downloadchromium_src-6239d34076222cbfe1d42770c604822b0ba894f4.zip
chromium_src-6239d34076222cbfe1d42770c604822b0ba894f4.tar.gz
chromium_src-6239d34076222cbfe1d42770c604822b0ba894f4.tar.bz2
This implements the new system for Graphics2D only.
This works by adding a new thunk layer that will forward to an "API" that's either per-instance (function APIs) or per-resource (resource APIs). The proxying and such is then implemented in terms of this C++ API. Ideally the trackers of the PP_Resource/PP_Instance -> object mapping would be shared between the plugin and renderer processes. To keep this patch under control, I did this as a virtual base class which is implemented by ppapi::proxy::PluginResourceTracker and webkit::ppapi::ResourceTracker. Later, the functionality of these objects should be shared in a common tracker class. Still to do it a lot of cleanup and merging of things. Also, the namespaces are a bit out of control. Review URL: http://codereview.chromium.org/6905088 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84519 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/thunk/thunk.h')
-rw-r--r--ppapi/thunk/thunk.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/ppapi/thunk/thunk.h b/ppapi/thunk/thunk.h
new file mode 100644
index 0000000..39ae8f9
--- /dev/null
+++ b/ppapi/thunk/thunk.h
@@ -0,0 +1,24 @@
+// Copyright (c) 2011 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_THUNK_THUNK_H_
+#define PPAPI_THUNK_THUNK_H_
+
+#include "base/synchronization/lock.h"
+
+struct PPB_Graphics2D;
+struct PPB_ImageData;
+
+namespace ppapi {
+namespace thunk {
+
+const PPB_Graphics2D* GetPPB_Graphics2D_Thunk();
+const PPB_ImageData* GetPPB_ImageData_Thunk();
+
+} // namespace thunk
+} // namespace ppapi
+
+#endif // PPAPI_THUNK_THUNK_H_
+
+