summaryrefslogtreecommitdiffstats
path: root/ppapi/thunk
diff options
context:
space:
mode:
Diffstat (limited to 'ppapi/thunk')
-rw-r--r--ppapi/thunk/enter.cc28
-rw-r--r--ppapi/thunk/enter.h18
-rw-r--r--ppapi/thunk/interfaces_postamble.h25
-rw-r--r--ppapi/thunk/interfaces_ppb_private.h14
-rw-r--r--ppapi/thunk/interfaces_ppb_public_dev.h42
-rw-r--r--ppapi/thunk/interfaces_ppb_public_stable.h78
-rw-r--r--ppapi/thunk/interfaces_preamble.h31
-rw-r--r--ppapi/thunk/ppb_buffer_thunk.cc2
-rw-r--r--ppapi/thunk/ppb_char_set_thunk.cc2
-rw-r--r--ppapi/thunk/ppb_console_thunk.cc42
-rw-r--r--ppapi/thunk/ppb_context_3d_thunk.cc2
-rw-r--r--ppapi/thunk/ppb_cursor_control_thunk.cc2
-rw-r--r--ppapi/thunk/ppb_directory_reader_thunk.cc2
-rw-r--r--ppapi/thunk/ppb_file_chooser_thunk.cc2
-rw-r--r--ppapi/thunk/ppb_font_thunk.cc2
-rw-r--r--ppapi/thunk/ppb_gles_chromium_texture_mapping_thunk.cc2
-rw-r--r--ppapi/thunk/ppb_input_event_thunk.cc2
-rw-r--r--ppapi/thunk/ppb_instance_api.h9
-rw-r--r--ppapi/thunk/ppb_instance_thunk.cc6
-rw-r--r--ppapi/thunk/ppb_mouse_lock_thunk.cc2
-rw-r--r--ppapi/thunk/ppb_surface_3d_thunk.cc2
-rw-r--r--ppapi/thunk/ppb_transport_thunk.cc2
-rw-r--r--ppapi/thunk/ppb_video_capture_thunk.cc2
-rw-r--r--ppapi/thunk/ppb_video_decoder_thunk.cc2
-rw-r--r--ppapi/thunk/ppb_video_layer_thunk.cc2
-rw-r--r--ppapi/thunk/ppb_widget_thunk.cc2
-rw-r--r--ppapi/thunk/thunk.h80
27 files changed, 331 insertions, 74 deletions
diff --git a/ppapi/thunk/enter.cc b/ppapi/thunk/enter.cc
new file mode 100644
index 0000000..da3f85c
--- /dev/null
+++ b/ppapi/thunk/enter.cc
@@ -0,0 +1,28 @@
+// 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.
+
+#include "ppapi/thunk/enter.h"
+
+#include "ppapi/thunk/ppb_instance_api.h"
+#include "ppapi/thunk/resource_creation_api.h"
+
+namespace ppapi {
+namespace thunk {
+
+EnterResourceCreation::EnterResourceCreation(PP_Instance instance)
+ : EnterFunctionNoLock<ResourceCreationAPI>(instance, true) {
+}
+
+EnterResourceCreation::~EnterResourceCreation() {
+}
+
+EnterInstance::EnterInstance(PP_Instance instance)
+ : EnterFunctionNoLock<PPB_Instance_FunctionAPI>(instance, true) {
+}
+
+EnterInstance::~EnterInstance() {
+}
+
+} // namespace thunk
+} // namespace ppapi
diff --git a/ppapi/thunk/enter.h b/ppapi/thunk/enter.h
index e83a1a1..ffa865d2d 100644
--- a/ppapi/thunk/enter.h
+++ b/ppapi/thunk/enter.h
@@ -128,6 +128,24 @@ class EnterResourceNoLock : public EnterResource<ResourceT> {
}
};
+// Simpler wrapper to enter the resource creation API. This is used for every
+// class so we have this helper function to save template instantiations and
+// typing.
+class EnterResourceCreation : public EnterFunctionNoLock<ResourceCreationAPI> {
+ public:
+ EnterResourceCreation(PP_Instance instance);
+ ~EnterResourceCreation();
+};
+
+// Simpler wrapper to enter the instance API from proxy code. This is used for
+// many interfaces so we have this helper function to save template
+// instantiations and typing.
+class EnterInstance : public EnterFunctionNoLock<PPB_Instance_FunctionAPI> {
+ public:
+ EnterInstance(PP_Instance instance);
+ ~EnterInstance();
+};
+
} // namespace thunk
} // namespace ppapi
diff --git a/ppapi/thunk/interfaces_postamble.h b/ppapi/thunk/interfaces_postamble.h
new file mode 100644
index 0000000..cebfe74
--- /dev/null
+++ b/ppapi/thunk/interfaces_postamble.h
@@ -0,0 +1,25 @@
+// 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.
+
+// Cleans up after interfaces_preamble.h, see that file for more.
+
+#ifdef UNDEFINE_PROXIED_API
+#undef UNDEFINE_PROXIED_API
+#undef PROXIED_API
+#endif
+
+#ifdef UNDEFINE_UNPROXIED_API
+#undef UNDEFINE_UNPROXIED_API
+#undef UNPROXIED_API
+#endif
+
+#ifdef UNDEFINE_PROXIED_IFACE
+#undef UNDEFINE_PROXIED_IFACE
+#undef PROXIED_IFACE
+#endif
+
+#ifdef UNDEFINE_UNPROXIED_IFACE
+#undef UNDEFINE_UNPROXIED_IFACE
+#undef UNPROXIED_IFACE
+#endif
diff --git a/ppapi/thunk/interfaces_ppb_private.h b/ppapi/thunk/interfaces_ppb_private.h
new file mode 100644
index 0000000..19e9065
--- /dev/null
+++ b/ppapi/thunk/interfaces_ppb_private.h
@@ -0,0 +1,14 @@
+// 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.
+
+// Please see inteface_ppb_public_stable for the documentation on the format of
+// this file.
+
+#include "ppapi/thunk/interfaces_preamble.h"
+
+PROXIED_API(PPB_Broker)
+
+PROXIED_IFACE(PPB_Broker, PPB_BROKER_TRUSTED_INTERFACE_0_2, PPB_Broker)
+
+#include "ppapi/thunk/interfaces_postamble.h"
diff --git a/ppapi/thunk/interfaces_ppb_public_dev.h b/ppapi/thunk/interfaces_ppb_public_dev.h
new file mode 100644
index 0000000..3e202a5
--- /dev/null
+++ b/ppapi/thunk/interfaces_ppb_public_dev.h
@@ -0,0 +1,42 @@
+// 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.
+
+// Please see inteface_ppb_public_stable for the documentation on the format of
+// this file.
+
+#include "ppapi/thunk/interfaces_preamble.h"
+
+PROXIED_API(PPB_Buffer)
+PROXIED_API(PPB_CharSet)
+PROXIED_API(PPB_Context3D)
+PROXIED_API(PPB_CursorControl)
+PROXIED_API(PPB_FileChooser)
+PROXIED_API(PPB_Font)
+PROXIED_API(PPB_Graphics3D)
+PROXIED_API(PPB_Surface3D)
+PROXIED_API(PPB_VideoCapture)
+PROXIED_API(PPB_VideoDecoder)
+
+PROXIED_IFACE(PPB_Buffer, PPB_BUFFER_DEV_INTERFACE_0_4, PPB_Buffer_Dev)
+PROXIED_IFACE(PPB_CharSet, PPB_CHAR_SET_DEV_INTERFACE_0_4, PPB_CharSet_Dev)
+PROXIED_IFACE(PPB_Context3D, PPB_CONTEXT_3D_DEV_INTERFACE_0_1,
+ PPB_Context3D_Dev)
+PROXIED_IFACE(PPB_Context3D, PPB_GLES_CHROMIUM_TEXTURE_MAPPING_DEV_INTERFACE,
+ PPB_GLESChromiumTextureMapping_Dev)
+PROXIED_IFACE(PPB_CursorControl, PPB_CURSOR_CONTROL_DEV_INTERFACE_0_4,
+ PPB_CursorControl_Dev)
+PROXIED_IFACE(PPB_FileChooser, PPB_FILECHOOSER_DEV_INTERFACE_0_5,
+ PPB_FileChooser_Dev)
+PROXIED_IFACE(PPB_Font, PPB_FONT_DEV_INTERFACE_0_6, PPB_Font_Dev)
+PROXIED_IFACE(PPB_Instance, PPB_CONSOLE_DEV_INTERFACE, PPB_Console_Dev)
+PROXIED_IFACE(PPB_Instance, PPB_MOUSELOCK_DEV_INTERFACE_0_1,
+ PPB_MouseLock_Dev)
+PROXIED_IFACE(PPB_Surface3D, PPB_SURFACE_3D_DEV_INTERFACE_0_2,
+ PPB_Surface3D_Dev)
+PROXIED_IFACE(PPB_VideoCapture, PPB_VIDEO_CAPTURE_DEV_INTERFACE_0_1,
+ PPB_VideoCapture_Dev)
+PROXIED_IFACE(PPB_VideoDecoder, PPB_VIDEODECODER_DEV_INTERFACE_0_16,
+ PPB_VideoDecoder_Dev)
+
+#include "ppapi/thunk/interfaces_postamble.h"
diff --git a/ppapi/thunk/interfaces_ppb_public_stable.h b/ppapi/thunk/interfaces_ppb_public_stable.h
new file mode 100644
index 0000000..579ce15
--- /dev/null
+++ b/ppapi/thunk/interfaces_ppb_public_stable.h
@@ -0,0 +1,78 @@
+// 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.
+
+#include "ppapi/thunk/interfaces_preamble.h"
+
+// This file contains lists of interfaces. It's intended to be included by
+// another file which defines implementations of the macros. This allows files
+// to do specific registration tasks for each supported interface.
+
+
+// Api categories
+// --------------
+// Enumerates the categories of APIs. These correspnd to the *_api.h files in
+// this directory. One API may implement one or more actual interfaces.
+//
+// For PROXIED_APIs, these also correspond to *_Proxy objects. The proxied ones
+// define factory functions for each of these classes. UNPROXIED_APIs are ones
+// that exist in the webkit/plugins/ppapi/*_impl.h, but not in the proxy.
+PROXIED_API(PPB_Audio)
+// AudioConfig isn't proxied in the normal way, we have only local classes and
+// serialize it to a struct when we need it on the host side.
+UNPROXIED_API(PPB_AudioConfig)
+PROXIED_API(PPB_Core)
+UNPROXIED_API(PPB_FileIO)
+PROXIED_API(PPB_FileRef)
+PROXIED_API(PPB_FileSystem)
+PROXIED_API(PPB_Graphics2D)
+UNPROXIED_API(PPB_ImageData)
+PROXIED_API(PPB_Instance)
+PROXIED_API(PPB_URLLoader)
+PROXIED_API(PPB_URLResponseInfo)
+
+// Interfaces
+// ----------
+// Enumerates interfaces as (api_name, interface_name, interface_struct).
+//
+// The api_name corresponds to the class in the list above for the object
+// that implements the API. Some things may be special and aren't implemented
+// by any specific API object, and we use "NoAPIName" for those. Implementors
+// of these macros should handle this case. There can be more than one line
+// referring to the same api_name (typically different versions of the
+// same interface).
+//
+// The interface_name is the string that corresponds to the interface.
+//
+// The interface_struct is the typename of the struct corresponding to the
+// interface string.
+PROXIED_IFACE(PPB_Audio, PPB_AUDIO_INTERFACE_1_0, PPB_Audio)
+// This has no corresponding _Proxy object since it does no IPC.
+PROXIED_IFACE(NoAPIName, PPB_AUDIO_CONFIG_INTERFACE_1_0, PPB_AudioConfig)
+// Note: Core is special and is registered manually.
+UNPROXIED_IFACE(PPB_FileIO, PPB_FILEIO_INTERFACE_1_0, PPB_FileIO)
+PROXIED_IFACE(PPB_FileRef, PPB_FILEREF_INTERFACE_1_0, PPB_FileRef)
+PROXIED_IFACE(PPB_FileSystem, PPB_FILESYSTEM_INTERFACE_1_0, PPB_FileSystem)
+PROXIED_IFACE(PPB_Graphics2D, PPB_GRAPHICS_2D_INTERFACE_1_0, PPB_Graphics2D)
+PROXIED_IFACE(PPB_Graphics3D, PPB_GRAPHICS_3D_INTERFACE_1_0, PPB_Graphics3D)
+// ImageData doesn't have a normal _Proxy object since it only uses Create
+// to proxy, and that happens in the ResourceCreationAPI.
+PROXIED_IFACE(NoAPIName, PPB_IMAGEDATA_INTERFACE_1_0, PPB_ImageData)
+PROXIED_IFACE(PPB_Instance, PPB_INSTANCE_INTERFACE_1_0, PPB_Instance)
+PROXIED_IFACE(NoAPIName, PPB_INPUT_EVENT_INTERFACE_1_0, PPB_InputEvent)
+PROXIED_IFACE(NoAPIName, PPB_KEYBOARD_INPUT_EVENT_INTERFACE_1_0,
+ PPB_KeyboardInputEvent)
+PROXIED_IFACE(NoAPIName, PPB_MOUSE_INPUT_EVENT_INTERFACE_1_0,
+ PPB_MouseInputEvent_1_0)
+PROXIED_IFACE(NoAPIName, PPB_MOUSE_INPUT_EVENT_INTERFACE_1_1,
+ PPB_MouseInputEvent)
+PROXIED_IFACE(NoAPIName, PPB_WHEEL_INPUT_EVENT_INTERFACE_1_0,
+ PPB_WheelInputEvent)
+PROXIED_IFACE(PPB_Instance, PPB_MESSAGING_INTERFACE_1_0, PPB_Messaging)
+PROXIED_IFACE(PPB_URLLoader, PPB_URLLOADER_INTERFACE_1_0, PPB_URLLoader)
+PROXIED_IFACE(NoAPIName, PPB_URLREQUESTINFO_INTERFACE_1_0, PPB_URLRequestInfo)
+PROXIED_IFACE(PPB_URLResponseInfo, PPB_URLRESPONSEINFO_INTERFACE_1_0,
+ PPB_URLResponseInfo)
+// Note: PPB_Var is special and registered manually.
+
+#include "ppapi/thunk/interfaces_postamble.h"
diff --git a/ppapi/thunk/interfaces_preamble.h b/ppapi/thunk/interfaces_preamble.h
new file mode 100644
index 0000000..7fe1d77
--- /dev/null
+++ b/ppapi/thunk/interfaces_preamble.h
@@ -0,0 +1,31 @@
+// 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.
+
+// This file defines empty versions of the macros used in the interfaces_*.h
+// files, as long as they aren't already defined. This allows users of those
+// files to only implement the macros they need, and everything else will
+// compile.
+//
+// Include this file at the top, and interfaces_postamble.h at the bottom. The
+// postamble will clean up these definitions.
+
+#ifndef PROXIED_API
+#define PROXIED_API(api_name)
+#define UNDEFINE_PROXIED_API
+#endif
+
+#ifndef UNPROXIED_API
+#define UNPROXIED_API(api_name)
+#define UNDEFINE_UNPROXIED_API
+#endif
+
+#ifndef PROXIED_IFACE
+#define PROXIED_IFACE(api_name, iface_str, iface_struct)
+#define UNDEFINE_PROXIED_IFACE
+#endif
+
+#ifndef UNPROXIED_IFACE
+#define UNPROXIED_IFACE(api_name, iface_str, iface_struct)
+#define UNDEFINE_UNPROXIED_IFACE
+#endif
diff --git a/ppapi/thunk/ppb_buffer_thunk.cc b/ppapi/thunk/ppb_buffer_thunk.cc
index cf4952c..1772048 100644
--- a/ppapi/thunk/ppb_buffer_thunk.cc
+++ b/ppapi/thunk/ppb_buffer_thunk.cc
@@ -57,7 +57,7 @@ const PPB_Buffer_Dev g_ppb_buffer_thunk = {
} // namespace
-const PPB_Buffer_Dev* GetPPB_Buffer_Thunk() {
+const PPB_Buffer_Dev* GetPPB_Buffer_Dev_Thunk() {
return &g_ppb_buffer_thunk;
}
diff --git a/ppapi/thunk/ppb_char_set_thunk.cc b/ppapi/thunk/ppb_char_set_thunk.cc
index bc36bad..1b02038 100644
--- a/ppapi/thunk/ppb_char_set_thunk.cc
+++ b/ppapi/thunk/ppb_char_set_thunk.cc
@@ -54,7 +54,7 @@ const PPB_CharSet_Dev g_ppb_char_set_thunk = {
} // namespace
-const PPB_CharSet_Dev* GetPPB_CharSet_Thunk() {
+const PPB_CharSet_Dev* GetPPB_CharSet_Dev_Thunk() {
return &g_ppb_char_set_thunk;
}
diff --git a/ppapi/thunk/ppb_console_thunk.cc b/ppapi/thunk/ppb_console_thunk.cc
new file mode 100644
index 0000000..509c128
--- /dev/null
+++ b/ppapi/thunk/ppb_console_thunk.cc
@@ -0,0 +1,42 @@
+// 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.
+
+#include "ppapi/c/dev/ppb_console_dev.h"
+#include "ppapi/thunk/thunk.h"
+#include "ppapi/thunk/enter.h"
+#include "ppapi/thunk/ppb_instance_api.h"
+
+namespace ppapi {
+namespace thunk {
+
+namespace {
+
+void Log(PP_Instance instance, PP_LogLevel_Dev level, struct PP_Var value) {
+ EnterInstance enter(instance);
+ if (enter.succeeded())
+ return enter.functions()->Log(instance, level, value);
+}
+
+void LogWithSource(PP_Instance instance,
+ PP_LogLevel_Dev level,
+ PP_Var source,
+ PP_Var value) {
+ EnterInstance enter(instance);
+ if (enter.succeeded())
+ return enter.functions()->LogWithSource(instance, level, source, value);
+}
+
+const PPB_Console_Dev g_ppb_console_thunk = {
+ &Log,
+ &LogWithSource
+};
+
+} // namespace
+
+const PPB_Console_Dev* GetPPB_Console_Dev_Thunk() {
+ return &g_ppb_console_thunk;
+}
+
+} // namespace thunk
+} // namespace ppapi
diff --git a/ppapi/thunk/ppb_context_3d_thunk.cc b/ppapi/thunk/ppb_context_3d_thunk.cc
index cbb035a..200e044 100644
--- a/ppapi/thunk/ppb_context_3d_thunk.cc
+++ b/ppapi/thunk/ppb_context_3d_thunk.cc
@@ -64,7 +64,7 @@ const PPB_Context3D_Dev g_ppb_context_3d_thunk = {
} // namespace
-const PPB_Context3D_Dev* GetPPB_Context3D_Thunk() {
+const PPB_Context3D_Dev* GetPPB_Context3D_Dev_Thunk() {
return &g_ppb_context_3d_thunk;
}
diff --git a/ppapi/thunk/ppb_cursor_control_thunk.cc b/ppapi/thunk/ppb_cursor_control_thunk.cc
index 56ba078..b1f5409 100644
--- a/ppapi/thunk/ppb_cursor_control_thunk.cc
+++ b/ppapi/thunk/ppb_cursor_control_thunk.cc
@@ -59,7 +59,7 @@ const PPB_CursorControl_Dev g_ppb_cursor_control_thunk = {
} // namespace
-const PPB_CursorControl_Dev* GetPPB_CursorControl_Thunk() {
+const PPB_CursorControl_Dev* GetPPB_CursorControl_Dev_Thunk() {
return &g_ppb_cursor_control_thunk;
}
diff --git a/ppapi/thunk/ppb_directory_reader_thunk.cc b/ppapi/thunk/ppb_directory_reader_thunk.cc
index c631194..f8e95537 100644
--- a/ppapi/thunk/ppb_directory_reader_thunk.cc
+++ b/ppapi/thunk/ppb_directory_reader_thunk.cc
@@ -46,7 +46,7 @@ const PPB_DirectoryReader_Dev g_ppb_directory_reader_thunk = {
} // namespace
-const PPB_DirectoryReader_Dev* GetPPB_DirectoryReader_Thunk() {
+const PPB_DirectoryReader_Dev* GetPPB_DirectoryReader_Dev_Thunk() {
return &g_ppb_directory_reader_thunk;
}
diff --git a/ppapi/thunk/ppb_file_chooser_thunk.cc b/ppapi/thunk/ppb_file_chooser_thunk.cc
index c58f052..774ef03 100644
--- a/ppapi/thunk/ppb_file_chooser_thunk.cc
+++ b/ppapi/thunk/ppb_file_chooser_thunk.cc
@@ -55,7 +55,7 @@ const PPB_FileChooser_Dev g_ppb_file_chooser_thunk = {
} // namespace
-const PPB_FileChooser_Dev* GetPPB_FileChooser_Thunk() {
+const PPB_FileChooser_Dev* GetPPB_FileChooser_Dev_Thunk() {
return &g_ppb_file_chooser_thunk;
}
diff --git a/ppapi/thunk/ppb_font_thunk.cc b/ppapi/thunk/ppb_font_thunk.cc
index ae13e01..841170a 100644
--- a/ppapi/thunk/ppb_font_thunk.cc
+++ b/ppapi/thunk/ppb_font_thunk.cc
@@ -93,7 +93,7 @@ const PPB_Font_Dev g_ppb_font_thunk = {
} // namespace
-const PPB_Font_Dev* GetPPB_Font_Thunk() {
+const PPB_Font_Dev* GetPPB_Font_Dev_Thunk() {
return &g_ppb_font_thunk;
}
diff --git a/ppapi/thunk/ppb_gles_chromium_texture_mapping_thunk.cc b/ppapi/thunk/ppb_gles_chromium_texture_mapping_thunk.cc
index 6e8e7c5..085578a 100644
--- a/ppapi/thunk/ppb_gles_chromium_texture_mapping_thunk.cc
+++ b/ppapi/thunk/ppb_gles_chromium_texture_mapping_thunk.cc
@@ -69,7 +69,7 @@ g_ppb_gles_chromium_texture_mapping_thunk = {
} // namespace
const PPB_GLESChromiumTextureMapping_Dev*
-GetPPB_GLESChromiumTextureMapping_Thunk() {
+GetPPB_GLESChromiumTextureMapping_Dev_Thunk() {
return &g_ppb_gles_chromium_texture_mapping_thunk;
}
diff --git a/ppapi/thunk/ppb_input_event_thunk.cc b/ppapi/thunk/ppb_input_event_thunk.cc
index bd28495..6028c6e 100644
--- a/ppapi/thunk/ppb_input_event_thunk.cc
+++ b/ppapi/thunk/ppb_input_event_thunk.cc
@@ -281,7 +281,7 @@ const PPB_MouseInputEvent_1_0* GetPPB_MouseInputEvent_1_0_Thunk() {
return &g_ppb_mouse_input_event_1_0_thunk;
}
-const PPB_MouseInputEvent* GetPPB_MouseInputEvent_1_1_Thunk() {
+const PPB_MouseInputEvent* GetPPB_MouseInputEvent_Thunk() {
return &g_ppb_mouse_input_event_1_1_thunk;
}
diff --git a/ppapi/thunk/ppb_instance_api.h b/ppapi/thunk/ppb_instance_api.h
index e9cacef..9a5628b 100644
--- a/ppapi/thunk/ppb_instance_api.h
+++ b/ppapi/thunk/ppb_instance_api.h
@@ -29,6 +29,15 @@ class PPB_Instance_FunctionAPI {
PP_Var script,
PP_Var* exception) = 0;
+ // Console.
+ virtual void Log(PP_Instance instance,
+ int log_level,
+ PP_Var value) = 0;
+ virtual void LogWithSource(PP_Instance instance,
+ int log_level,
+ PP_Var source,
+ PP_Var value) = 0;
+
// Fullscreen.
virtual PP_Bool IsFullscreen(PP_Instance instance) = 0;
virtual PP_Bool SetFullscreen(PP_Instance instance, PP_Bool fullscreen) = 0;
diff --git a/ppapi/thunk/ppb_instance_thunk.cc b/ppapi/thunk/ppb_instance_thunk.cc
index a05f030..9cc9bd5 100644
--- a/ppapi/thunk/ppb_instance_thunk.cc
+++ b/ppapi/thunk/ppb_instance_thunk.cc
@@ -49,7 +49,7 @@ PP_Var ExecuteScript(PP_Instance instance,
return enter.functions()->ExecuteScript(instance, script, exception);
}
-const PPB_Instance_1_0 g_ppb_instance_1_0_thunk = {
+const PPB_Instance g_ppb_instance_thunk = {
&BindGraphics,
&IsFullFrame
};
@@ -62,8 +62,8 @@ const PPB_Instance_Private g_ppb_instance_private_thunk = {
} // namespace
-const PPB_Instance_1_0* GetPPB_Instance_1_0_Thunk() {
- return &g_ppb_instance_1_0_thunk;
+const PPB_Instance* GetPPB_Instance_Thunk() {
+ return &g_ppb_instance_thunk;
}
const PPB_Instance_Private* GetPPB_Instance_Private_Thunk() {
return &g_ppb_instance_private_thunk;
diff --git a/ppapi/thunk/ppb_mouse_lock_thunk.cc b/ppapi/thunk/ppb_mouse_lock_thunk.cc
index d9116b0..3f1d6d3 100644
--- a/ppapi/thunk/ppb_mouse_lock_thunk.cc
+++ b/ppapi/thunk/ppb_mouse_lock_thunk.cc
@@ -36,7 +36,7 @@ const PPB_MouseLock_Dev g_ppb_mouse_lock_thunk = {
} // namespace
-const PPB_MouseLock_Dev* GetPPB_MouseLock_Thunk() {
+const PPB_MouseLock_Dev* GetPPB_MouseLock_Dev_Thunk() {
return &g_ppb_mouse_lock_thunk;
}
diff --git a/ppapi/thunk/ppb_surface_3d_thunk.cc b/ppapi/thunk/ppb_surface_3d_thunk.cc
index e7034cb..ba1df6f 100644
--- a/ppapi/thunk/ppb_surface_3d_thunk.cc
+++ b/ppapi/thunk/ppb_surface_3d_thunk.cc
@@ -63,7 +63,7 @@ const PPB_Surface3D_Dev g_ppb_surface_3d_thunk = {
} // namespace
-const PPB_Surface3D_Dev* GetPPB_Surface3D_Thunk() {
+const PPB_Surface3D_Dev* GetPPB_Surface3D_Dev_Thunk() {
return &g_ppb_surface_3d_thunk;
}
diff --git a/ppapi/thunk/ppb_transport_thunk.cc b/ppapi/thunk/ppb_transport_thunk.cc
index b245514..17c572e 100644
--- a/ppapi/thunk/ppb_transport_thunk.cc
+++ b/ppapi/thunk/ppb_transport_thunk.cc
@@ -108,7 +108,7 @@ const PPB_Transport_Dev g_ppb_transport_thunk = {
} // namespace
-const PPB_Transport_Dev* GetPPB_Transport_Thunk() {
+const PPB_Transport_Dev* GetPPB_Transport_Dev_Thunk() {
return &g_ppb_transport_thunk;
}
diff --git a/ppapi/thunk/ppb_video_capture_thunk.cc b/ppapi/thunk/ppb_video_capture_thunk.cc
index c320cb5..f8704d0 100644
--- a/ppapi/thunk/ppb_video_capture_thunk.cc
+++ b/ppapi/thunk/ppb_video_capture_thunk.cc
@@ -65,7 +65,7 @@ const PPB_VideoCapture_Dev g_ppb_videocapture_thunk = {
} // namespace
-const PPB_VideoCapture_Dev* GetPPB_VideoCapture_Thunk() {
+const PPB_VideoCapture_Dev* GetPPB_VideoCapture_Dev_Thunk() {
return &g_ppb_videocapture_thunk;
}
diff --git a/ppapi/thunk/ppb_video_decoder_thunk.cc b/ppapi/thunk/ppb_video_decoder_thunk.cc
index b7a72d9..40b837b 100644
--- a/ppapi/thunk/ppb_video_decoder_thunk.cc
+++ b/ppapi/thunk/ppb_video_decoder_thunk.cc
@@ -90,7 +90,7 @@ const PPB_VideoDecoder_Dev g_ppb_videodecoder_thunk = {
} // namespace
-const PPB_VideoDecoder_Dev* GetPPB_VideoDecoder_Thunk() {
+const PPB_VideoDecoder_Dev* GetPPB_VideoDecoder_Dev_Thunk() {
return &g_ppb_videodecoder_thunk;
}
diff --git a/ppapi/thunk/ppb_video_layer_thunk.cc b/ppapi/thunk/ppb_video_layer_thunk.cc
index 4a1a258..ea31b9f 100644
--- a/ppapi/thunk/ppb_video_layer_thunk.cc
+++ b/ppapi/thunk/ppb_video_layer_thunk.cc
@@ -73,7 +73,7 @@ const PPB_VideoLayer_Dev g_ppb_videolayer_thunk = {
} // namespace
-const PPB_VideoLayer_Dev* GetPPB_VideoLayer_Thunk() {
+const PPB_VideoLayer_Dev* GetPPB_VideoLayer_Dev_Thunk() {
return &g_ppb_videolayer_thunk;
}
diff --git a/ppapi/thunk/ppb_widget_thunk.cc b/ppapi/thunk/ppb_widget_thunk.cc
index 374296b..ec77352 100644
--- a/ppapi/thunk/ppb_widget_thunk.cc
+++ b/ppapi/thunk/ppb_widget_thunk.cc
@@ -54,7 +54,7 @@ const PPB_Widget_Dev g_ppb_widget_thunk = {
} // namespace
-const PPB_Widget_Dev* GetPPB_Widget_Thunk() {
+const PPB_Widget_Dev* GetPPB_Widget_Dev_Thunk() {
return &g_ppb_widget_thunk;
}
diff --git a/ppapi/thunk/thunk.h b/ppapi/thunk/thunk.h
index 94c31a7..47d3660 100644
--- a/ppapi/thunk/thunk.h
+++ b/ppapi/thunk/thunk.h
@@ -7,55 +7,56 @@
#include "ppapi/thunk/ppapi_thunk_export.h"
-struct PPB_Audio;
-struct PPB_AudioConfig;
+// Declares a getter for the interface thunk of the form:
+//
+// const PPB_Foo* ppapi::thunk::GetPPB_Foo_Thunk();
+//
+#define IFACE(api_name, interface_name, InterfaceType) \
+ struct InterfaceType; \
+ namespace ppapi { namespace thunk { \
+ PPAPI_THUNK_EXPORT const InterfaceType* Get##InterfaceType##_Thunk(); \
+ } }
+#define PROXIED_IFACE IFACE
+#define UNPROXIED_IFACE IFACE
+
+#include "ppapi/thunk/interfaces_ppb_public_stable.h"
+#include "ppapi/thunk/interfaces_ppb_public_dev.h"
+
+#undef UNPROXIED_IFACE
+#undef PROXIED_IFACE
+#undef IFACE
+
struct PPB_AudioTrusted;
struct PPB_BrokerTrusted;
struct PPB_Buffer_Dev;
struct PPB_BufferTrusted;
struct PPB_CharSet_Dev;
-struct PPB_Context3D_Dev;
+struct PPB_Console_Dev;
struct PPB_Context3DTrusted_Dev;
struct PPB_CursorControl_Dev;
struct PPB_DirectoryReader_Dev;
struct PPB_FileChooser_Dev;
-struct PPB_FileIO;
struct PPB_FileIOTrusted;
-struct PPB_FileRef;
-struct PPB_FileSystem;
struct PPB_Find_Dev;
struct PPB_Flash_Menu;
struct PPB_Flash_NetConnector;
struct PPB_Flash_TCPSocket;
struct PPB_Font_Dev;
struct PPB_Fullscreen_Dev;
-struct PPB_GLESChromiumTextureMapping_Dev;
-struct PPB_Graphics2D;
struct PPB_Graphics3D;
struct PPB_Graphics3DTrusted;
struct PPB_ImageData;
struct PPB_ImageDataTrusted;
-struct PPB_InputEvent;
-struct PPB_Instance;
struct PPB_Instance_Private;
-struct PPB_KeyboardInputEvent;
struct PPB_LayerCompositor_Dev;
-struct PPB_Messaging;
-struct PPB_MouseInputEvent_1_0;
-struct PPB_MouseInputEvent;
-struct PPB_MouseLock_Dev;
struct PPB_QueryPolicy_Dev;
struct PPB_Scrollbar_0_5_Dev;
struct PPB_Surface3D_Dev;
struct PPB_Transport_Dev;
-struct PPB_URLLoader;
struct PPB_URLLoaderTrusted;
-struct PPB_URLRequestInfo;
-struct PPB_URLResponseInfo;
struct PPB_VideoCapture_Dev;
struct PPB_VideoDecoder_Dev;
struct PPB_VideoLayer_Dev;
-struct PPB_WheelInputEvent;
struct PPB_Widget_Dev;
struct PPB_Zoom_Dev;
@@ -64,65 +65,34 @@ typedef PPB_Instance PPB_Instance_1_0;
namespace ppapi {
namespace thunk {
-PPAPI_THUNK_EXPORT const PPB_Audio* GetPPB_Audio_Thunk();
-PPAPI_THUNK_EXPORT const PPB_AudioConfig* GetPPB_AudioConfig_Thunk();
PPAPI_THUNK_EXPORT const PPB_AudioTrusted* GetPPB_AudioTrusted_Thunk();
PPAPI_THUNK_EXPORT const PPB_BrokerTrusted* GetPPB_Broker_Thunk();
-PPAPI_THUNK_EXPORT const PPB_Buffer_Dev* GetPPB_Buffer_Thunk();
PPAPI_THUNK_EXPORT const PPB_BufferTrusted* GetPPB_BufferTrusted_Thunk();
-PPAPI_THUNK_EXPORT const PPB_CharSet_Dev* GetPPB_CharSet_Thunk();
-PPAPI_THUNK_EXPORT const PPB_Context3D_Dev* GetPPB_Context3D_Thunk();
+PPAPI_THUNK_EXPORT const PPB_Console_Dev* GetPPB_Console_Dev_Thunk();
PPAPI_THUNK_EXPORT const PPB_Context3DTrusted_Dev*
GetPPB_Context3DTrusted_Thunk();
PPAPI_THUNK_EXPORT const PPB_CursorControl_Dev* GetPPB_CursorControl_Thunk();
PPAPI_THUNK_EXPORT const PPB_DirectoryReader_Dev*
- GetPPB_DirectoryReader_Thunk();
-PPAPI_THUNK_EXPORT const PPB_FileChooser_Dev* GetPPB_FileChooser_Thunk();
-PPAPI_THUNK_EXPORT const PPB_FileIO* GetPPB_FileIO_Thunk();
+ GetPPB_DirectoryReader_Dev_Thunk();
PPAPI_THUNK_EXPORT const PPB_FileIOTrusted* GetPPB_FileIOTrusted_Thunk();
-PPAPI_THUNK_EXPORT const PPB_FileRef* GetPPB_FileRef_Thunk();
-PPAPI_THUNK_EXPORT const PPB_FileSystem* GetPPB_FileSystem_Thunk();
PPAPI_THUNK_EXPORT const PPB_Find_Dev* GetPPB_Find_Thunk();
PPAPI_THUNK_EXPORT const PPB_Flash_Menu* GetPPB_Flash_Menu_Thunk();
PPAPI_THUNK_EXPORT const PPB_Flash_NetConnector*
GetPPB_Flash_NetConnector_Thunk();
PPAPI_THUNK_EXPORT const PPB_Flash_TCPSocket* GetPPB_Flash_TCPSocket_Thunk();
-PPAPI_THUNK_EXPORT const PPB_Font_Dev* GetPPB_Font_Thunk();
PPAPI_THUNK_EXPORT const PPB_Fullscreen_Dev* GetPPB_Fullscreen_Thunk();
-PPAPI_THUNK_EXPORT const PPB_GLESChromiumTextureMapping_Dev*
- GetPPB_GLESChromiumTextureMapping_Thunk();
-PPAPI_THUNK_EXPORT const PPB_Graphics2D* GetPPB_Graphics2D_Thunk();
-PPAPI_THUNK_EXPORT const PPB_Graphics3D* GetPPB_Graphics3D_Thunk();
PPAPI_THUNK_EXPORT const PPB_Graphics3DTrusted*
GetPPB_Graphics3DTrusted_Thunk();
-PPAPI_THUNK_EXPORT const PPB_InputEvent* GetPPB_InputEvent_Thunk();
-PPAPI_THUNK_EXPORT const PPB_ImageData* GetPPB_ImageData_Thunk();
PPAPI_THUNK_EXPORT const PPB_ImageDataTrusted* GetPPB_ImageDataTrusted_Thunk();
-PPAPI_THUNK_EXPORT const PPB_Instance_1_0* GetPPB_Instance_1_0_Thunk();
PPAPI_THUNK_EXPORT const PPB_Instance_Private* GetPPB_Instance_Private_Thunk();
-PPAPI_THUNK_EXPORT const PPB_KeyboardInputEvent*
- GetPPB_KeyboardInputEvent_Thunk();
PPAPI_THUNK_EXPORT const PPB_LayerCompositor_Dev*
GetPPB_LayerCompositor_Thunk();
PPAPI_THUNK_EXPORT const PPB_QueryPolicy_Dev* GetPPB_QueryPolicy_Thunk();
-PPAPI_THUNK_EXPORT const PPB_Messaging* GetPPB_Messaging_Thunk();
-PPAPI_THUNK_EXPORT const PPB_MouseInputEvent_1_0*
- GetPPB_MouseInputEvent_1_0_Thunk();
-PPAPI_THUNK_EXPORT const PPB_MouseInputEvent*
- GetPPB_MouseInputEvent_1_1_Thunk();
-PPAPI_THUNK_EXPORT const PPB_MouseLock_Dev* GetPPB_MouseLock_Thunk();
PPAPI_THUNK_EXPORT const PPB_Scrollbar_0_5_Dev* GetPPB_Scrollbar_Thunk();
-PPAPI_THUNK_EXPORT const PPB_Surface3D_Dev* GetPPB_Surface3D_Thunk();
-PPAPI_THUNK_EXPORT const PPB_Transport_Dev* GetPPB_Transport_Thunk();
-PPAPI_THUNK_EXPORT const PPB_URLLoader* GetPPB_URLLoader_Thunk();
+PPAPI_THUNK_EXPORT const PPB_Transport_Dev* GetPPB_Transport_Dev_Thunk();
PPAPI_THUNK_EXPORT const PPB_URLLoaderTrusted* GetPPB_URLLoaderTrusted_Thunk();
-PPAPI_THUNK_EXPORT const PPB_URLRequestInfo* GetPPB_URLRequestInfo_Thunk();
-PPAPI_THUNK_EXPORT const PPB_URLResponseInfo* GetPPB_URLResponseInfo_Thunk();
-PPAPI_THUNK_EXPORT const PPB_VideoCapture_Dev* GetPPB_VideoCapture_Thunk();
-PPAPI_THUNK_EXPORT const PPB_VideoDecoder_Dev* GetPPB_VideoDecoder_Thunk();
-PPAPI_THUNK_EXPORT const PPB_VideoLayer_Dev* GetPPB_VideoLayer_Thunk();
-PPAPI_THUNK_EXPORT const PPB_WheelInputEvent* GetPPB_WheelInputEvent_Thunk();
-PPAPI_THUNK_EXPORT const PPB_Widget_Dev* GetPPB_Widget_Thunk();
+PPAPI_THUNK_EXPORT const PPB_VideoLayer_Dev* GetPPB_VideoLayer_Dev_Thunk();
+PPAPI_THUNK_EXPORT const PPB_Widget_Dev* GetPPB_Widget_Dev_Thunk();
PPAPI_THUNK_EXPORT const PPB_Zoom_Dev* GetPPB_Zoom_Thunk();
} // namespace thunk