diff options
59 files changed, 272 insertions, 133 deletions
diff --git a/ppapi/ppapi_proxy.gypi b/ppapi/ppapi_proxy.gypi index 65b4039..35b0a03 100644 --- a/ppapi/ppapi_proxy.gypi +++ b/ppapi/ppapi_proxy.gypi @@ -6,10 +6,12 @@ 'targets': [ { 'target_name': 'ppapi_proxy', - 'type': 'static_library', + 'type': '<(component)', 'dependencies': [ - '../ipc/ipc.gyp:ipc', + '../base/base.gyp:base', + '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', '../gpu/gpu.gyp:gpu_ipc', + '../ipc/ipc.gyp:ipc', '../skia/skia.gyp:skia', '../ui/gfx/surface/surface.gyp:surface', 'ppapi.gyp:ppapi_c', @@ -158,14 +160,7 @@ 'proxy/var_serialization_rules.h', ], 'defines': [ - ], - 'conditions': [ - ['OS=="win"', { - }], - ['OS=="linux"', { - }], - ['OS=="mac"', { - }] + 'PPAPI_PROXY_IMPLEMENTATION', ], }, ], diff --git a/ppapi/ppapi_shared.gypi b/ppapi/ppapi_shared.gypi index 51fa35b..1f8453e 100644 --- a/ppapi/ppapi_shared.gypi +++ b/ppapi/ppapi_shared.gypi @@ -6,10 +6,11 @@ 'targets': [ { 'target_name': 'ppapi_shared', - 'type': 'static_library', + 'type': '<(component)', 'dependencies': [ 'ppapi.gyp:ppapi_c', '../base/base.gyp:base', + '../base/base.gyp:base_i18n', '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', '../build/temp_gyp/googleurl.gyp:googleurl', '../gpu/gpu.gyp:gles2_implementation', @@ -17,6 +18,10 @@ '../third_party/icu/icu.gyp:icuuc', '../ui/gfx/surface/surface.gyp:surface', ], + 'defines': [ + 'PPAPI_SHARED_IMPLEMENTATION', + 'PPAPI_THUNK_IMPLEMENTATION', + ], 'include_dirs': [ '..', ], diff --git a/ppapi/ppapi_tests.gypi b/ppapi/ppapi_tests.gypi index 34420b5..018e199 100644 --- a/ppapi/ppapi_tests.gypi +++ b/ppapi/ppapi_tests.gypi @@ -174,7 +174,10 @@ }, 'dependencies': [ 'ppapi_proxy', + 'ppapi_shared', '../base/base.gyp:test_support_base', + '../gpu/gpu.gyp:gpu_ipc', + '../ipc/ipc.gyp:ipc', '../ipc/ipc.gyp:test_support_ipc', '../testing/gmock.gyp:gmock', '../testing/gtest.gyp:gtest', diff --git a/ppapi/proxy/broker_dispatcher.h b/ppapi/proxy/broker_dispatcher.h index 6b907fb..85edaa6 100644 --- a/ppapi/proxy/broker_dispatcher.h +++ b/ppapi/proxy/broker_dispatcher.h @@ -11,7 +11,7 @@ namespace ppapi { namespace proxy { -class BrokerDispatcher : public ProxyChannel { +class PPAPI_PROXY_EXPORT BrokerDispatcher : public ProxyChannel { public: virtual ~BrokerDispatcher(); @@ -40,7 +40,7 @@ class BrokerDispatcher : public ProxyChannel { }; // The dispatcher for the browser side of the broker channel. -class BrokerHostDispatcher : public BrokerDispatcher { +class PPAPI_PROXY_EXPORT BrokerHostDispatcher : public BrokerDispatcher { public: BrokerHostDispatcher(base::ProcessHandle remote_process_handle); @@ -49,7 +49,7 @@ class BrokerHostDispatcher : public BrokerDispatcher { }; // The dispatcher for the broker side of the broker channel. -class BrokerSideDispatcher : public BrokerDispatcher { +class PPAPI_PROXY_EXPORT BrokerSideDispatcher : public BrokerDispatcher { public: BrokerSideDispatcher(base::ProcessHandle remote_process_handle, PP_ConnectInstance_Func connect_instance); diff --git a/ppapi/proxy/dispatcher.h b/ppapi/proxy/dispatcher.h index 1c7ef38..bf3e36f 100644 --- a/ppapi/proxy/dispatcher.h +++ b/ppapi/proxy/dispatcher.h @@ -42,7 +42,7 @@ class VarSerializationRules; // "Target" | "Source" // InterfaceProxy <---------------------- InterfaceProxy // | -class Dispatcher : public ProxyChannel { +class PPAPI_PROXY_EXPORT Dispatcher : public ProxyChannel { public: typedef const void* (*GetInterfaceFunc)(const char*); typedef int32_t (*InitModuleFunc)(PP_Module, GetInterfaceFunc); diff --git a/ppapi/proxy/host_dispatcher.h b/ppapi/proxy/host_dispatcher.h index ae514a9..57ba120 100644 --- a/ppapi/proxy/host_dispatcher.h +++ b/ppapi/proxy/host_dispatcher.h @@ -35,7 +35,7 @@ namespace proxy { class InterfaceProxy; class VarSerialization; -class HostDispatcher : public Dispatcher { +class PPAPI_PROXY_EXPORT HostDispatcher : public Dispatcher { public: // Constructor for the renderer side. // diff --git a/ppapi/proxy/plugin_dispatcher.h b/ppapi/proxy/plugin_dispatcher.h index 3490bc0..896689e 100644 --- a/ppapi/proxy/plugin_dispatcher.h +++ b/ppapi/proxy/plugin_dispatcher.h @@ -38,9 +38,9 @@ struct InstanceData { PP_Bool fullscreen; }; -class PluginDispatcher : public Dispatcher { +class PPAPI_PROXY_EXPORT PluginDispatcher : public Dispatcher { public: - class PluginDelegate : public ProxyChannel::Delegate { + class PPAPI_PROXY_EXPORT PluginDelegate : public ProxyChannel::Delegate { public: // Returns the set used for globally uniquifying PP_Instances. This same // set must be returned for all channels. diff --git a/ppapi/proxy/plugin_resource_tracker.h b/ppapi/proxy/plugin_resource_tracker.h index d3c72c8..7268ddc 100644 --- a/ppapi/proxy/plugin_resource_tracker.h +++ b/ppapi/proxy/plugin_resource_tracker.h @@ -15,6 +15,7 @@ #include "ppapi/c/pp_resource.h" #include "ppapi/c/pp_var.h" #include "ppapi/proxy/plugin_var_tracker.h" +#include "ppapi/proxy/ppapi_proxy_export.h" #include "ppapi/shared_impl/host_resource.h" #include "ppapi/shared_impl/resource_tracker.h" #include "ppapi/shared_impl/tracker_base.h" @@ -29,7 +30,8 @@ namespace proxy { class PluginDispatcher; -class PluginResourceTracker : public TrackerBase, public ResourceTracker { +class PPAPI_PROXY_EXPORT PluginResourceTracker : public TrackerBase, + public ResourceTracker { public: // Called by tests that want to specify a specific ResourceTracker. This // allows them to use a unique one each time and avoids singletons sticking diff --git a/ppapi/proxy/plugin_var_tracker.h b/ppapi/proxy/plugin_var_tracker.h index 09c7c21..405b03f 100644 --- a/ppapi/proxy/plugin_var_tracker.h +++ b/ppapi/proxy/plugin_var_tracker.h @@ -13,6 +13,7 @@ #include "base/memory/ref_counted.h" #include "ppapi/c/pp_stdint.h" #include "ppapi/c/pp_var.h" +#include "ppapi/proxy/ppapi_proxy_export.h" #include "ppapi/shared_impl/var_tracker.h" struct PPB_Var; @@ -28,7 +29,7 @@ namespace proxy { class PluginDispatcher; // Tracks live strings and objects in the plugin process. -class PluginVarTracker : public VarTracker { +class PPAPI_PROXY_EXPORT PluginVarTracker : public VarTracker { public: PluginVarTracker(); ~PluginVarTracker(); diff --git a/ppapi/proxy/ppapi_messages.h b/ppapi/proxy/ppapi_messages.h index f786163..ce50c42 100644 --- a/ppapi/proxy/ppapi_messages.h +++ b/ppapi/proxy/ppapi_messages.h @@ -30,12 +30,16 @@ #include "ppapi/c/dev/pp_video_dev.h" #include "ppapi/c/private/ppb_flash_tcp_socket.h" #include "ppapi/proxy/ppapi_param_traits.h" +#include "ppapi/proxy/ppapi_proxy_export.h" #include "ppapi/proxy/serialized_flash_menu.h" #include "ppapi/proxy/serialized_structs.h" #include "ppapi/shared_impl/input_event_impl.h" #include "ppapi/shared_impl/ppapi_preferences.h" #include "ppapi/shared_impl/url_request_info_impl.h" +#undef IPC_MESSAGE_EXPORT +#define IPC_MESSAGE_EXPORT PPAPI_PROXY_EXPORT + #define IPC_MESSAGE_START PpapiMsgStart IPC_ENUM_TRAITS(PP_InputEvent_Type) diff --git a/ppapi/proxy/ppapi_param_traits.cc b/ppapi/proxy/ppapi_param_traits.cc index b80df34..acd1fdd 100644 --- a/ppapi/proxy/ppapi_param_traits.cc +++ b/ppapi/proxy/ppapi_param_traits.cc @@ -9,7 +9,6 @@ #include "ppapi/c/pp_file_info.h" #include "ppapi/c/pp_resource.h" #include "ppapi/c/private/ppb_flash_tcp_socket.h" -#include "ppapi/proxy/interface_proxy.h" #include "ppapi/proxy/ppapi_messages.h" #include "ppapi/proxy/serialized_var.h" #include "ppapi/proxy/serialized_flash_menu.h" diff --git a/ppapi/proxy/ppapi_param_traits.h b/ppapi/proxy/ppapi_param_traits.h index 71fa9cb..0c2ab5b 100644 --- a/ppapi/proxy/ppapi_param_traits.h +++ b/ppapi/proxy/ppapi_param_traits.h @@ -13,6 +13,7 @@ #include "ppapi/c/pp_completion_callback.h" #include "ppapi/c/pp_rect.h" #include "ppapi/c/pp_var.h" +#include "ppapi/proxy/ppapi_proxy_export.h" #include "ppapi/shared_impl/file_ref_impl.h" struct PP_FileInfo; @@ -56,7 +57,7 @@ struct ParamTraits<PP_FileInfo> { }; template <> -struct ParamTraits<PP_Flash_NetAddress> { +struct PPAPI_PROXY_EXPORT ParamTraits<PP_Flash_NetAddress> { typedef PP_Flash_NetAddress param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* p); diff --git a/ppapi/proxy/ppapi_proxy_export.h b/ppapi/proxy/ppapi_proxy_export.h new file mode 100644 index 0000000..6bd0421 --- /dev/null +++ b/ppapi/proxy/ppapi_proxy_export.h @@ -0,0 +1,26 @@ +// 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_PROXY_PPAPI_PROXY_EXPORT_H_ +#define PPAPI_PROXY_PPAPI_PROXY_EXPORT_H_ +#pragma once + +#if defined(COMPONENT_BUILD) +#if defined(WIN32) + +#if defined(PPAPI_PROXY_IMPLEMENTATION) +#define PPAPI_PROXY_EXPORT __declspec(dllexport) +#else +#define PPAPI_PROXY_EXPORT __declspec(dllimport) +#endif // defined(PPAPI_PROXY_IMPLEMENTATION) + +#else // defined(WIN32) +#define PPAPI_PROXY_EXPORT __attribute__((visibility("default"))) +#endif + +#else // defined(COMPONENT_BUILD) +#define PPAPI_PROXY_EXPORT +#endif + +#endif // PPAPI_PROXY_PPAPI_PROXY_EXPORT_H_ diff --git a/ppapi/proxy/ppapi_proxy_test.cc b/ppapi/proxy/ppapi_proxy_test.cc index 34b108c..89ffa9f 100644 --- a/ppapi/proxy/ppapi_proxy_test.cc +++ b/ppapi/proxy/ppapi_proxy_test.cc @@ -10,7 +10,6 @@ #include "ppapi/c/pp_errors.h" #include "ppapi/c/private/ppb_proxy_private.h" #include "ppapi/proxy/ppapi_messages.h" -#include "ppapi/shared_impl/ppapi_preferences.cc" namespace ppapi { namespace proxy { diff --git a/ppapi/proxy/ppb_flash_tcp_socket_proxy.h b/ppapi/proxy/ppb_flash_tcp_socket_proxy.h index a0a402b..831a8cc 100644 --- a/ppapi/proxy/ppb_flash_tcp_socket_proxy.h +++ b/ppapi/proxy/ppb_flash_tcp_socket_proxy.h @@ -12,16 +12,17 @@ #include "ppapi/c/pp_resource.h" #include "ppapi/c/private/ppb_flash_tcp_socket.h" #include "ppapi/proxy/interface_proxy.h" +#include "ppapi/proxy/ppapi_proxy_export.h" namespace ppapi { namespace proxy { // The maximum number of bytes that each PpapiHostMsg_PPBFlashTCPSocket_Read // message is allowed to request. -extern const int32_t kFlashTCPSocketMaxReadSize; +PPAPI_PROXY_EXPORT extern const int32_t kFlashTCPSocketMaxReadSize; // The maximum number of bytes that each PpapiHostMsg_PPBFlashTCPSocket_Write // message is allowed to carry. -extern const int32_t kFlashTCPSocketMaxWriteSize; +PPAPI_PROXY_EXPORT extern const int32_t kFlashTCPSocketMaxWriteSize; class PPB_Flash_TCPSocket_Proxy : public InterfaceProxy { public: diff --git a/ppapi/proxy/proxy_channel.h b/ppapi/proxy/proxy_channel.h index 2aba843..744d087 100644 --- a/ppapi/proxy/proxy_channel.h +++ b/ppapi/proxy/proxy_channel.h @@ -10,6 +10,7 @@ #include "ipc/ipc_message.h" #include "ipc/ipc_platform_file.h" #include "ipc/ipc_sync_channel.h" +#include "ppapi/proxy/ppapi_proxy_export.h" namespace base { class MessageLoopProxy; @@ -25,8 +26,9 @@ namespace proxy { class VarSerializationRules; -class ProxyChannel : public IPC::Channel::Listener, - public IPC::Message::Sender { +class PPAPI_PROXY_EXPORT ProxyChannel + : public IPC::Channel::Listener, + public IPC::Message::Sender { public: typedef void (*ShutdownModuleFunc)(); diff --git a/ppapi/proxy/proxy_module.h b/ppapi/proxy/proxy_module.h index 2bcb367..8bddffa 100644 --- a/ppapi/proxy/proxy_module.h +++ b/ppapi/proxy/proxy_module.h @@ -8,6 +8,7 @@ #include <string> #include "base/basictypes.h" +#include "ppapi/proxy/ppapi_proxy_export.h" template<typename T> struct DefaultSingletonTraits; @@ -16,7 +17,7 @@ namespace proxy { class PluginDispatcher; -class ProxyModule { +class PPAPI_PROXY_EXPORT ProxyModule { public: // The global singleton getter. static ProxyModule* GetInstance(); diff --git a/ppapi/proxy/serialized_flash_menu.h b/ppapi/proxy/serialized_flash_menu.h index 9b8bed8..4be22bf 100644 --- a/ppapi/proxy/serialized_flash_menu.h +++ b/ppapi/proxy/serialized_flash_menu.h @@ -10,6 +10,7 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" +#include "ppapi/proxy/ppapi_proxy_export.h" struct PP_Flash_Menu; @@ -20,7 +21,7 @@ class Message; namespace ppapi { namespace proxy { -class SerializedFlashMenu { +class PPAPI_PROXY_EXPORT SerializedFlashMenu { public: SerializedFlashMenu(); ~SerializedFlashMenu(); diff --git a/ppapi/proxy/serialized_structs.h b/ppapi/proxy/serialized_structs.h index 706d6be..ea85757 100644 --- a/ppapi/proxy/serialized_structs.h +++ b/ppapi/proxy/serialized_structs.h @@ -27,7 +27,7 @@ class Dispatcher; // PP_FontDescript_Dev has to be redefined with a SerializedVar in place of // the PP_Var used for the face name. -struct SerializedFontDescription { +struct PPAPI_PROXY_EXPORT SerializedFontDescription { SerializedFontDescription(); ~SerializedFontDescription(); diff --git a/ppapi/proxy/serialized_var.h b/ppapi/proxy/serialized_var.h index 30a27fd..e75f480 100644 --- a/ppapi/proxy/serialized_var.h +++ b/ppapi/proxy/serialized_var.h @@ -11,6 +11,7 @@ #include "base/basictypes.h" #include "base/memory/ref_counted.h" #include "ppapi/c/pp_var.h" +#include "ppapi/proxy/ppapi_proxy_export.h" namespace IPC { class Message; @@ -61,7 +62,7 @@ class VarSerializationRules; // // The helper classes used for accessing the SerializedVar have more reasonable // behavior and will enforce that you don't do stupid things. -class SerializedVar { +class PPAPI_PROXY_EXPORT SerializedVar { public: SerializedVar(); ~SerializedVar(); @@ -82,7 +83,7 @@ class SerializedVar { friend class SerializedVarTestConstructor; friend class SerializedVarVectorReceiveInput; - class Inner : public base::RefCounted<Inner> { + class PPAPI_PROXY_EXPORT Inner : public base::RefCounted<Inner> { public: Inner(); Inner(VarSerializationRules* serialization_rules); @@ -212,7 +213,8 @@ class SerializedVarSendInput : public SerializedVar { // Send(new MyFunctionMsg(&result)); // return result.Return(dispatcher()); // } -class ReceiveSerializedVarReturnValue : public SerializedVar { +class PPAPI_PROXY_EXPORT ReceiveSerializedVarReturnValue + : public SerializedVar { public: // Note that we can't set the dispatcher in the constructor because the // data will be overridden when the return value is set. This constructor is @@ -303,7 +305,7 @@ class ReceiveSerializedVarVectorOutParam { // void OnMsgMyFunction(SerializedVarReceiveInput param) { // MyFunction(param.Get()); // } -class SerializedVarReceiveInput { +class PPAPI_PROXY_EXPORT SerializedVarReceiveInput { public: // We rely on the implicit constructor here since the IPC layer will call // us with a SerializedVar. Pass this object by value, the copy constructor @@ -359,7 +361,7 @@ class SerializedVarVectorReceiveInput { // void OnMsgMyFunction(SerializedVarReturnValue result) { // result.Return(dispatcher(), MyFunction()); // } -class SerializedVarReturnValue { +class PPAPI_PROXY_EXPORT SerializedVarReturnValue { public: // We rely on the implicit constructor here since the IPC layer will call // us with a SerializedVar*. Pass this object by value, the copy constructor @@ -387,7 +389,7 @@ class SerializedVarReturnValue { // void OnMsgMyFunction(SerializedVarOutParam out_param) { // MyFunction(out_param.OutParam(dispatcher())); // } -class SerializedVarOutParam { +class PPAPI_PROXY_EXPORT SerializedVarOutParam { public: // We rely on the implicit constructor here since the IPC layer will call // us with a SerializedVar*. Pass this object by value, the copy constructor @@ -432,7 +434,7 @@ class SerializedVarVectorOutParam { // For tests that just want to construct a SerializedVar for giving it to one // of the other classes. This emulates a SerializedVar just received over the // wire from another process. -class SerializedVarTestConstructor : public SerializedVar { +class PPAPI_PROXY_EXPORT SerializedVarTestConstructor : public SerializedVar { public: // For POD-types and objects. explicit SerializedVarTestConstructor(const PP_Var& pod_var); @@ -442,7 +444,7 @@ class SerializedVarTestConstructor : public SerializedVar { }; // For tests that want to read what's in a SerializedVar. -class SerializedVarTestReader : public SerializedVar { +class PPAPI_PROXY_EXPORT SerializedVarTestReader : public SerializedVar { public: explicit SerializedVarTestReader(const SerializedVar& var); diff --git a/ppapi/shared_impl/audio_config_impl.h b/ppapi/shared_impl/audio_config_impl.h index 69a2b73..7577e00 100644 --- a/ppapi/shared_impl/audio_config_impl.h +++ b/ppapi/shared_impl/audio_config_impl.h @@ -12,8 +12,9 @@ namespace ppapi { -class AudioConfigImpl : public Resource, - public thunk::PPB_AudioConfig_API { +class PPAPI_SHARED_EXPORT AudioConfigImpl + : public Resource, + public thunk::PPB_AudioConfig_API { public: virtual ~AudioConfigImpl(); diff --git a/ppapi/shared_impl/audio_impl.h b/ppapi/shared_impl/audio_impl.h index 220962bb..201582d 100644 --- a/ppapi/shared_impl/audio_impl.h +++ b/ppapi/shared_impl/audio_impl.h @@ -18,8 +18,9 @@ namespace ppapi { // Implements the logic to map shared memory and run the audio thread signaled // from the sync socket. Both the proxy and the renderer implementation use // this code. -class AudioImpl : public thunk::PPB_Audio_API, - public base::DelegateSimpleThread::Delegate { +class PPAPI_SHARED_EXPORT AudioImpl + : public thunk::PPB_Audio_API, + public base::DelegateSimpleThread::Delegate { public: AudioImpl(); virtual ~AudioImpl(); diff --git a/ppapi/shared_impl/char_set_impl.h b/ppapi/shared_impl/char_set_impl.h index 4891346..d52e246 100644 --- a/ppapi/shared_impl/char_set_impl.h +++ b/ppapi/shared_impl/char_set_impl.h @@ -7,6 +7,7 @@ #include "base/basictypes.h" #include "ppapi/c/dev/ppb_char_set_dev.h" +#include "ppapi/shared_impl/ppapi_shared_export.h" struct PPB_Memory_Dev; @@ -14,7 +15,7 @@ namespace ppapi { // Contains the implementation of character set conversion that is shared // between the proxy and the renderer. -class CharSetImpl { +class PPAPI_SHARED_EXPORT CharSetImpl { public: static char* UTF16ToCharSet(const PPB_Memory_Dev* memory, const uint16_t* utf16, diff --git a/ppapi/shared_impl/crypto_impl.h b/ppapi/shared_impl/crypto_impl.h index a959bc9..0dd99b2 100644 --- a/ppapi/shared_impl/crypto_impl.h +++ b/ppapi/shared_impl/crypto_impl.h @@ -7,10 +7,11 @@ #include "ppapi/c/pp_bool.h" #include "ppapi/c/pp_stdint.h" +#include "ppapi/shared_impl/ppapi_shared_export.h" namespace ppapi { -class CryptoImpl { +class PPAPI_SHARED_EXPORT CryptoImpl { public: static void GetRandomBytes(char* buffer, uint32_t num_bytes); }; diff --git a/ppapi/shared_impl/file_ref_impl.h b/ppapi/shared_impl/file_ref_impl.h index 515912b..3f4bf8f 100644 --- a/ppapi/shared_impl/file_ref_impl.h +++ b/ppapi/shared_impl/file_ref_impl.h @@ -29,7 +29,8 @@ struct PPB_FileRef_CreateInfo { // This class provides the shared implementation of a FileRef. The functions // that actually "do stuff" like Touch and MakeDirectory are implemented // differently for the proxied and non-proxied derived classes. -class FileRefImpl : public Resource, public thunk::PPB_FileRef_API { +class PPAPI_SHARED_EXPORT FileRefImpl : public Resource, + public thunk::PPB_FileRef_API { public: struct InitAsImpl {}; struct InitAsProxy {}; diff --git a/ppapi/shared_impl/font_impl.h b/ppapi/shared_impl/font_impl.h index 9496b16..a8ab2df 100644 --- a/ppapi/shared_impl/font_impl.h +++ b/ppapi/shared_impl/font_impl.h @@ -12,12 +12,13 @@ #include "base/memory/scoped_ptr.h" #include "ppapi/c/pp_bool.h" #include "ppapi/c/pp_stdint.h" +#include "ppapi/shared_impl/ppapi_shared_export.h" struct PP_FontDescription_Dev; namespace ppapi { -class FontImpl { +class PPAPI_SHARED_EXPORT FontImpl { public: // Validates the parameters in thee description. Can be called on any thread. static bool IsPPFontDescriptionValid(const PP_FontDescription_Dev& desc); diff --git a/ppapi/shared_impl/function_group_base.h b/ppapi/shared_impl/function_group_base.h index 23d82d5..31b164f 100644 --- a/ppapi/shared_impl/function_group_base.h +++ b/ppapi/shared_impl/function_group_base.h @@ -7,6 +7,8 @@ #include <stddef.h> // For NULL. +#include "ppapi/shared_impl/ppapi_shared_export.h" + #define FOR_ALL_PPAPI_FUNCTION_APIS(F) \ F(PPB_CharSet_FunctionAPI) \ F(PPB_CursorControl_FunctionAPI) \ @@ -25,7 +27,7 @@ FOR_ALL_PPAPI_FUNCTION_APIS(DECLARE_FUNCTION_CLASS) #undef DECLARE_FUNCTION_CLASS } // namespace thunk -class FunctionGroupBase { +class PPAPI_SHARED_EXPORT FunctionGroupBase { public: virtual ~FunctionGroupBase(); diff --git a/ppapi/shared_impl/graphics_3d_impl.h b/ppapi/shared_impl/graphics_3d_impl.h index 781f33f..e9f4187 100644 --- a/ppapi/shared_impl/graphics_3d_impl.h +++ b/ppapi/shared_impl/graphics_3d_impl.h @@ -8,6 +8,7 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" #include "ppapi/c/pp_completion_callback.h" +#include "ppapi/shared_impl/ppapi_shared_export.h" #include "ppapi/thunk/ppb_graphics_3d_api.h" namespace gpu { @@ -20,7 +21,7 @@ class GLES2Implementation; namespace ppapi { -class Graphics3DImpl : public thunk::PPB_Graphics3D_API { +class PPAPI_SHARED_EXPORT Graphics3DImpl : public thunk::PPB_Graphics3D_API { public: // PPB_Graphics3D_API implementation. virtual int32_t GetAttribs(int32_t* attrib_list) OVERRIDE; diff --git a/ppapi/shared_impl/host_resource.h b/ppapi/shared_impl/host_resource.h index 0d9b3bf..b614546 100644 --- a/ppapi/shared_impl/host_resource.h +++ b/ppapi/shared_impl/host_resource.h @@ -7,6 +7,7 @@ #include "ppapi/c/pp_instance.h" #include "ppapi/c/pp_resource.h" +#include "ppapi/shared_impl/ppapi_shared_export.h" namespace ppapi { @@ -17,7 +18,7 @@ namespace ppapi { // this tranformation. // // All HostResources respresent IDs valid in the host. -class HostResource { +class PPAPI_SHARED_EXPORT HostResource { public: HostResource() : instance_(0), host_resource_(0) { } diff --git a/ppapi/shared_impl/id_assignment.h b/ppapi/shared_impl/id_assignment.h index 1adc2bd..039e7fe 100644 --- a/ppapi/shared_impl/id_assignment.h +++ b/ppapi/shared_impl/id_assignment.h @@ -8,6 +8,7 @@ #include <limits> #include "base/basictypes.h" +#include "ppapi/shared_impl/ppapi_shared_export.h" namespace ppapi { @@ -21,7 +22,7 @@ enum PPIdType { PP_ID_TYPE_COUNT }; -extern const unsigned int kPPIdTypeBits; +PPAPI_SHARED_EXPORT extern const unsigned int kPPIdTypeBits; extern const int32 kMaxPPId; diff --git a/ppapi/shared_impl/image_data_impl.h b/ppapi/shared_impl/image_data_impl.h index 1d2f76f5..f931c78 100644 --- a/ppapi/shared_impl/image_data_impl.h +++ b/ppapi/shared_impl/image_data_impl.h @@ -7,6 +7,7 @@ #include "ppapi/c/pp_bool.h" #include "ppapi/c/ppb_image_data.h" +#include "ppapi/shared_impl/ppapi_shared_export.h" namespace ppapi { @@ -19,7 +20,7 @@ namespace ppapi { // probably best to have some kind of "configuration" message that the renderer // sends to the plugin process on startup that contains all of these kind of // settings. -class ImageDataImpl { +class PPAPI_SHARED_EXPORT ImageDataImpl { public: static PP_ImageDataFormat GetNativeImageDataFormat(); static bool IsImageDataFormatSupported(PP_ImageDataFormat format); diff --git a/ppapi/shared_impl/input_event_impl.h b/ppapi/shared_impl/input_event_impl.h index baa4bda..db6588b 100644 --- a/ppapi/shared_impl/input_event_impl.h +++ b/ppapi/shared_impl/input_event_impl.h @@ -17,7 +17,7 @@ namespace ppapi { // IF YOU ADD STUFF TO THIS CLASS // ============================== // Be sure to add it to the STRUCT_TRAITS at the top of ppapi_messages.h -struct InputEventData { +struct PPAPI_SHARED_EXPORT InputEventData { InputEventData(); ~InputEventData(); @@ -44,7 +44,9 @@ struct InputEventData { // This simple class implements the PPB_InputEvent_API in terms of the // shared InputEventData structure -class InputEventImpl : public Resource, public thunk::PPB_InputEvent_API { +class PPAPI_SHARED_EXPORT InputEventImpl + : public Resource, + public thunk::PPB_InputEvent_API { public: struct InitAsImpl {}; struct InitAsProxy {}; diff --git a/ppapi/shared_impl/instance_impl.h b/ppapi/shared_impl/instance_impl.h index 9cbfb89..fdc741f 100644 --- a/ppapi/shared_impl/instance_impl.h +++ b/ppapi/shared_impl/instance_impl.h @@ -6,10 +6,11 @@ #define PPAPI_SHARED_IMPL_INSTANCE_IMPL_H_ #include "ppapi/c/pp_stdint.h" +#include "ppapi/shared_impl/ppapi_shared_export.h" namespace ppapi { -class InstanceImpl { +class PPAPI_SHARED_EXPORT InstanceImpl { public: virtual ~InstanceImpl(); diff --git a/ppapi/shared_impl/opengles2_impl.h b/ppapi/shared_impl/opengles2_impl.h index 6284a42..ea2a3b7 100644 --- a/ppapi/shared_impl/opengles2_impl.h +++ b/ppapi/shared_impl/opengles2_impl.h @@ -6,10 +6,11 @@ #define PPAPI_SHARED_IMPL_OPENGLES2_IMPL_H_ #include "ppapi/c/dev/ppb_opengles_dev.h" +#include "ppapi/shared_impl/ppapi_shared_export.h" namespace ppapi { -class OpenGLES2Impl { +class PPAPI_SHARED_EXPORT OpenGLES2Impl { public: static const PPB_OpenGLES2_Dev* GetInterface(); }; diff --git a/ppapi/shared_impl/ppapi_preferences.h b/ppapi/shared_impl/ppapi_preferences.h index e026290..8e0847c 100644 --- a/ppapi/shared_impl/ppapi_preferences.h +++ b/ppapi/shared_impl/ppapi_preferences.h @@ -6,12 +6,13 @@ #define PPAPI_SHARED_IMPL_PPAPI_PREFERENCES_H_ #include "base/string16.h" +#include "ppapi/shared_impl/ppapi_shared_export.h" struct WebPreferences; namespace ppapi { -struct Preferences { +struct PPAPI_SHARED_EXPORT Preferences { public: Preferences(); explicit Preferences(const WebPreferences& prefs); diff --git a/ppapi/shared_impl/ppapi_shared_export.h b/ppapi/shared_impl/ppapi_shared_export.h new file mode 100644 index 0000000..fb3c036 --- /dev/null +++ b/ppapi/shared_impl/ppapi_shared_export.h @@ -0,0 +1,26 @@ +// 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_SHARED_IMPL_PPAPI_SHARED_EXPORT_H_ +#define PPAPI_SHARED_IMPL_PPAPI_SHARED_EXPORT_H_ +#pragma once + +#if defined(COMPONENT_BUILD) +#if defined(WIN32) + +#if defined(PPAPI_SHARED_IMPLEMENTATION) +#define PPAPI_SHARED_EXPORT __declspec(dllexport) +#else +#define PPAPI_SHARED_EXPORT __declspec(dllimport) +#endif // defined(PPAPI_SHARED_IMPLEMENTATION) + +#else // defined(WIN32) +#define PPAPI_SHARED_EXPORT __attribute__((visibility("default"))) +#endif + +#else // defined(COMPONENT_BUILD) +#define PPAPI_SHARED_EXPORT +#endif + +#endif // PPAPI_SHARED_IMPL_PPAPI_SHARED_EXPORT_H_ diff --git a/ppapi/shared_impl/ppp_instance_combined.h b/ppapi/shared_impl/ppp_instance_combined.h index 12e3301..3daf727 100644 --- a/ppapi/shared_impl/ppp_instance_combined.h +++ b/ppapi/shared_impl/ppp_instance_combined.h @@ -7,10 +7,11 @@ #include "base/basictypes.h" #include "ppapi/c/ppp_instance.h" +#include "ppapi/shared_impl/ppapi_shared_export.h" namespace ppapi { -struct PPP_Instance_Combined : public PPP_Instance_1_0 { +struct PPAPI_SHARED_EXPORT PPP_Instance_Combined : public PPP_Instance_1_0 { public: explicit PPP_Instance_Combined(const PPP_Instance_1_0& instance_if); diff --git a/ppapi/shared_impl/resource.h b/ppapi/shared_impl/resource.h index 6bb4099..677d8a9 100644 --- a/ppapi/shared_impl/resource.h +++ b/ppapi/shared_impl/resource.h @@ -59,7 +59,7 @@ FOR_ALL_PPAPI_RESOURCE_APIS(DECLARE_RESOURCE_CLASS) #undef DECLARE_RESOURCE_CLASS } // namespace thunk -class Resource : public base::RefCounted<Resource> { +class PPAPI_SHARED_EXPORT Resource : public base::RefCounted<Resource> { public: // For constructing non-proxied objects. This just takes the associated // instance, and generates a new resource ID. The host resource will be the diff --git a/ppapi/shared_impl/resource_tracker.h b/ppapi/shared_impl/resource_tracker.h index b631653..e60d8e0 100644 --- a/ppapi/shared_impl/resource_tracker.h +++ b/ppapi/shared_impl/resource_tracker.h @@ -12,12 +12,13 @@ #include "base/memory/linked_ptr.h" #include "ppapi/c/pp_instance.h" #include "ppapi/c/pp_resource.h" +#include "ppapi/shared_impl/ppapi_shared_export.h" namespace ppapi { class Resource; -class ResourceTracker { +class PPAPI_SHARED_EXPORT ResourceTracker { public: ResourceTracker(); virtual ~ResourceTracker(); diff --git a/ppapi/shared_impl/scoped_pp_resource.h b/ppapi/shared_impl/scoped_pp_resource.h index 96db4ee..b42e21e 100644 --- a/ppapi/shared_impl/scoped_pp_resource.h +++ b/ppapi/shared_impl/scoped_pp_resource.h @@ -6,13 +6,14 @@ #define PPAPI_SHARED_IMPL_SCOPED_RESOURCE_H_ #include "ppapi/c/pp_resource.h" +#include "ppapi/shared_impl/ppapi_shared_export.h" namespace ppapi { class Resource; // This is a version of scoped_refptr but for PP_Resources. -class ScopedPPResource { +class PPAPI_SHARED_EXPORT ScopedPPResource { public: struct PassRef {}; diff --git a/ppapi/shared_impl/time_conversion.h b/ppapi/shared_impl/time_conversion.h index bf41987..0acd39e 100644 --- a/ppapi/shared_impl/time_conversion.h +++ b/ppapi/shared_impl/time_conversion.h @@ -7,20 +7,21 @@ #include "base/time.h" #include "ppapi/c/pp_time.h" +#include "ppapi/shared_impl/ppapi_shared_export.h" namespace ppapi { -PP_Time TimeToPPTime(base::Time t); -base::Time PPTimeToTime(PP_Time t); +PPAPI_SHARED_EXPORT PP_Time TimeToPPTime(base::Time t); +PPAPI_SHARED_EXPORT base::Time PPTimeToTime(PP_Time t); -PP_TimeTicks TimeTicksToPPTimeTicks(base::TimeTicks t); +PPAPI_SHARED_EXPORT PP_TimeTicks TimeTicksToPPTimeTicks(base::TimeTicks t); // Converts between WebKit event times and time ticks. WebKit event times are // currently expressed in terms of wall clock time. This function does the // proper mapping to time ticks, assuming the wall clock time doesn't change // (which isn't necessarily the case). -PP_TimeTicks EventTimeToPPTimeTicks(double event_time); -double PPTimeTicksToEventTime(PP_TimeTicks t); +PPAPI_SHARED_EXPORT PP_TimeTicks EventTimeToPPTimeTicks(double event_time); +PPAPI_SHARED_EXPORT double PPTimeTicksToEventTime(PP_TimeTicks t); } // namespace ppapi diff --git a/ppapi/shared_impl/tracker_base.h b/ppapi/shared_impl/tracker_base.h index 49624c3..9ff19d4 100644 --- a/ppapi/shared_impl/tracker_base.h +++ b/ppapi/shared_impl/tracker_base.h @@ -11,6 +11,7 @@ #include "ppapi/c/pp_module.h" #include "ppapi/c/pp_resource.h" #include "ppapi/proxy/interface_id.h" +#include "ppapi/shared_impl/ppapi_shared_export.h" namespace ppapi { @@ -26,7 +27,7 @@ class VarTracker; // does is forward to the process-type-specific tracker to get the information. // TODO(fischman/vrk): When brettw fixes the TODO above, fix the ugliness in // VideoDecoderImpl accordingly. -class TrackerBase { +class PPAPI_SHARED_EXPORT TrackerBase { public: // Must be called before any other function that uses the TrackerBase. // This sets the getter that returns the global implmenetation of diff --git a/ppapi/shared_impl/url_request_info_impl.h b/ppapi/shared_impl/url_request_info_impl.h index 622f8c5..9c619f9 100644 --- a/ppapi/shared_impl/url_request_info_impl.h +++ b/ppapi/shared_impl/url_request_info_impl.h @@ -18,8 +18,8 @@ namespace thunk { class PPB_FileRef_API; } -struct PPB_URLRequestInfo_Data { - struct BodyItem { +struct PPAPI_SHARED_EXPORT PPB_URLRequestInfo_Data { + struct PPAPI_SHARED_EXPORT BodyItem { BodyItem(); explicit BodyItem(const std::string& data); BodyItem(Resource* file_ref, @@ -90,8 +90,9 @@ struct PPB_URLRequestInfo_Data { // ppapi_messages.h }; -class URLRequestInfoImpl : public ::ppapi::Resource, - public ::ppapi::thunk::PPB_URLRequestInfo_API { +class PPAPI_SHARED_EXPORT URLRequestInfoImpl + : public ::ppapi::Resource, + public ::ppapi::thunk::PPB_URLRequestInfo_API { public: // This constructor initializes the object as a proxy object with the given // host resource. diff --git a/ppapi/shared_impl/url_util_impl.h b/ppapi/shared_impl/url_util_impl.h index 55d6c63..ae869c3 100644 --- a/ppapi/shared_impl/url_util_impl.h +++ b/ppapi/shared_impl/url_util_impl.h @@ -12,6 +12,7 @@ #include "ppapi/c/dev/ppb_url_util_dev.h" #include "ppapi/c/pp_module.h" #include "ppapi/c/pp_var.h" +#include "ppapi/shared_impl/ppapi_shared_export.h" class GURL; @@ -19,7 +20,7 @@ namespace ppapi { // Contains the implementation of PPB_URLUtil that is shared between the proxy // and the renderer. -class URLUtilImpl { +class PPAPI_SHARED_EXPORT URLUtilImpl { public: // PPB_URLUtil shared functions. static PP_Var Canonicalize(PP_Module pp_module, diff --git a/ppapi/shared_impl/var.h b/ppapi/shared_impl/var.h index ce5aa2b..ceb7271 100644 --- a/ppapi/shared_impl/var.h +++ b/ppapi/shared_impl/var.h @@ -11,6 +11,7 @@ #include "base/memory/ref_counted.h" #include "ppapi/c/pp_module.h" #include "ppapi/c/pp_var.h" +#include "ppapi/shared_impl/ppapi_shared_export.h" namespace ppapi { @@ -23,7 +24,7 @@ class StringVar; // Represents a non-POD var. This is derived from a resource even though it // isn't a resource from the plugin's perspective. This allows us to re-use // the refcounting and the association with the module from the resource code. -class Var : public base::RefCounted<Var> { +class PPAPI_SHARED_EXPORT Var : public base::RefCounted<Var> { public: virtual ~Var(); @@ -88,7 +89,7 @@ class Var : public base::RefCounted<Var> { // if (!string) // return false; // Not a string or an invalid var. // DoSomethingWithTheString(string->value()); -class StringVar : public Var { +class PPAPI_SHARED_EXPORT StringVar : public Var { public: StringVar(PP_Module module, const std::string& str); StringVar(PP_Module module, const char* str, uint32 len); diff --git a/ppapi/shared_impl/var_tracker.h b/ppapi/shared_impl/var_tracker.h index f05c5ac..f91c209 100644 --- a/ppapi/shared_impl/var_tracker.h +++ b/ppapi/shared_impl/var_tracker.h @@ -9,6 +9,7 @@ #include "base/hash_tables.h" #include "base/memory/ref_counted.h" #include "ppapi/c/pp_var.h" +#include "ppapi/shared_impl/ppapi_shared_export.h" namespace ppapi { @@ -26,7 +27,7 @@ class Var; // This class maintains the "track_with_no_reference_count" but doesn't do // anything with it other than call virtual functions. The interesting parts // are added by the PluginObjectVar derived from this class. -class VarTracker { +class PPAPI_SHARED_EXPORT VarTracker { public: VarTracker(); virtual ~VarTracker(); diff --git a/ppapi/shared_impl/video_decoder_impl.h b/ppapi/shared_impl/video_decoder_impl.h index 191efa9..ff19d09 100644 --- a/ppapi/shared_impl/video_decoder_impl.h +++ b/ppapi/shared_impl/video_decoder_impl.h @@ -30,7 +30,8 @@ namespace ppapi { // Implements the logic to set and run callbacks for various video decoder // events. Both the proxy and the renderer implementation share this code. -class VideoDecoderImpl : public thunk::PPB_VideoDecoder_API { +class PPAPI_SHARED_EXPORT VideoDecoderImpl + : NON_EXPORTED_BASE(public thunk::PPB_VideoDecoder_API) { public: VideoDecoderImpl(); virtual ~VideoDecoderImpl(); diff --git a/ppapi/shared_impl/webkit_forwarding.h b/ppapi/shared_impl/webkit_forwarding.h index 2094523..d571aaa 100644 --- a/ppapi/shared_impl/webkit_forwarding.h +++ b/ppapi/shared_impl/webkit_forwarding.h @@ -9,6 +9,7 @@ #include "ppapi/c/pp_bool.h" #include "ppapi/c/pp_stdint.h" +#include "ppapi/shared_impl/ppapi_shared_export.h" struct PP_FontDescription_Dev; struct PP_FontMetrics_Dev; @@ -27,9 +28,9 @@ namespace ppapi { struct Preferences; -class WebKitForwarding { +class PPAPI_SHARED_EXPORT WebKitForwarding { public: - class Font { + class PPAPI_SHARED_EXPORT Font { public: // C++ version of PP_TextRun_Dev. Since the functions below will be called // on an alternate thread in the proxy, and since there are different @@ -43,7 +44,7 @@ class WebKitForwarding { // DoDrawText takes too many arguments to be used with base::Bind, so we // use this struct to hold them. - struct DrawTextParams { + struct PPAPI_SHARED_EXPORT DrawTextParams { DrawTextParams(skia::PlatformCanvas* destination_arg, const TextRun& text_arg, const PP_Point* position_arg, diff --git a/ppapi/thunk/ppapi_thunk_export.h b/ppapi/thunk/ppapi_thunk_export.h new file mode 100644 index 0000000..cbecccd --- /dev/null +++ b/ppapi/thunk/ppapi_thunk_export.h @@ -0,0 +1,26 @@ +// 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_PPAPI_THUNK_EXPORT_H_ +#define PPAPI_THUNK_PPAPI_THUNK_EXPORT_H_ +#pragma once + +#if defined(COMPONENT_BUILD) +#if defined(WIN32) + +#if defined(PPAPI_THUNK_IMPLEMENTATION) +#define PPAPI_THUNK_EXPORT __declspec(dllexport) +#else +#define PPAPI_THUNK_EXPORT __declspec(dllimport) +#endif // defined(PPAPI_THUNK_IMPLEMENTATION) + +#else // defined(WIN32) +#define PPAPI_THUNK_EXPORT __attribute__((visibility("default"))) +#endif + +#else // defined(COMPONENT_BUILD) +#define PPAPI_THUNK_EXPORT +#endif + +#endif // PPAPI_THUNK_PPAPI_THUNK_EXPORT_H_ diff --git a/ppapi/thunk/ppb_audio_api.h b/ppapi/thunk/ppb_audio_api.h index 3d21299..8d3a0b8 100644 --- a/ppapi/thunk/ppb_audio_api.h +++ b/ppapi/thunk/ppb_audio_api.h @@ -7,11 +7,12 @@ #include "ppapi/c/pp_completion_callback.h" #include "ppapi/c/ppb_audio.h" +#include "ppapi/thunk/ppapi_thunk_export.h" namespace ppapi { namespace thunk { -class PPB_Audio_API { +class PPAPI_THUNK_EXPORT PPB_Audio_API { public: virtual ~PPB_Audio_API() {} diff --git a/ppapi/thunk/ppb_audio_config_api.h b/ppapi/thunk/ppb_audio_config_api.h index c45611b..17542fa 100644 --- a/ppapi/thunk/ppb_audio_config_api.h +++ b/ppapi/thunk/ppb_audio_config_api.h @@ -6,11 +6,12 @@ #define PPAPI_THUNK_AUDIO_CONFIG_API_H_ #include "ppapi/c/ppb_audio_config.h" +#include "ppapi/thunk/ppapi_thunk_export.h" namespace ppapi { namespace thunk { -class PPB_AudioConfig_API { +class PPAPI_THUNK_EXPORT PPB_AudioConfig_API { public: virtual ~PPB_AudioConfig_API() {} diff --git a/ppapi/thunk/ppb_file_ref_api.h b/ppapi/thunk/ppb_file_ref_api.h index b2f0e9d..ddcae7c 100644 --- a/ppapi/thunk/ppb_file_ref_api.h +++ b/ppapi/thunk/ppb_file_ref_api.h @@ -6,6 +6,7 @@ #define PPAPI_THUNK_PPB_FILE_REF_API_H_ #include "ppapi/c/ppb_file_ref.h" +#include "ppapi/thunk/ppapi_thunk_export.h" namespace ppapi { @@ -13,7 +14,7 @@ struct PPB_FileRef_CreateInfo; namespace thunk { -class PPB_FileRef_API { +class PPAPI_THUNK_EXPORT PPB_FileRef_API { public: virtual ~PPB_FileRef_API() {} diff --git a/ppapi/thunk/ppb_graphics_2d_thunk.cc b/ppapi/thunk/ppb_graphics_2d_thunk.cc index 65aa4b0..df6d569 100644 --- a/ppapi/thunk/ppb_graphics_2d_thunk.cc +++ b/ppapi/thunk/ppb_graphics_2d_thunk.cc @@ -9,6 +9,7 @@ #include "ppapi/thunk/enter.h" #include "ppapi/thunk/ppb_graphics_2d_api.h" #include "ppapi/thunk/resource_creation_api.h" +#include "ppapi/thunk/thunk.h" namespace ppapi { namespace thunk { diff --git a/ppapi/thunk/ppb_graphics_3d_api.h b/ppapi/thunk/ppb_graphics_3d_api.h index f513b17..8df3972 100644 --- a/ppapi/thunk/ppb_graphics_3d_api.h +++ b/ppapi/thunk/ppb_graphics_3d_api.h @@ -7,11 +7,12 @@ #include "ppapi/c/dev/ppb_graphics_3d_dev.h" #include "ppapi/c/dev/ppb_graphics_3d_trusted_dev.h" +#include "ppapi/thunk/ppapi_thunk_export.h" namespace ppapi { namespace thunk { -class PPB_Graphics3D_API { +class PPAPI_THUNK_EXPORT PPB_Graphics3D_API { public: virtual ~PPB_Graphics3D_API() {} diff --git a/ppapi/thunk/ppb_image_data_thunk.cc b/ppapi/thunk/ppb_image_data_thunk.cc index 9d91302..7941ab6 100644 --- a/ppapi/thunk/ppb_image_data_thunk.cc +++ b/ppapi/thunk/ppb_image_data_thunk.cc @@ -8,6 +8,7 @@ #include "ppapi/thunk/enter.h" #include "ppapi/thunk/ppb_image_data_api.h" #include "ppapi/thunk/resource_creation_api.h" +#include "ppapi/thunk/thunk.h" namespace ppapi { namespace thunk { diff --git a/ppapi/thunk/ppb_image_data_trusted_thunk.cc b/ppapi/thunk/ppb_image_data_trusted_thunk.cc index d477e2b..db53aa2 100644 --- a/ppapi/thunk/ppb_image_data_trusted_thunk.cc +++ b/ppapi/thunk/ppb_image_data_trusted_thunk.cc @@ -6,6 +6,7 @@ #include "ppapi/c/trusted/ppb_image_data_trusted.h" #include "ppapi/thunk/enter.h" #include "ppapi/thunk/ppb_image_data_api.h" +#include "ppapi/thunk/thunk.h" namespace ppapi { namespace thunk { diff --git a/ppapi/thunk/ppb_input_event_api.h b/ppapi/thunk/ppb_input_event_api.h index 51ac5db..d0e8c4b 100644 --- a/ppapi/thunk/ppb_input_event_api.h +++ b/ppapi/thunk/ppb_input_event_api.h @@ -6,6 +6,7 @@ #define PPAPI_THUNK_PPB_INPUT_EVENT_API_H_ #include "ppapi/c/ppb_input_event.h" +#include "ppapi/thunk/ppapi_thunk_export.h" namespace ppapi { @@ -13,7 +14,7 @@ struct InputEventData; namespace thunk { -class PPB_InputEvent_API { +class PPAPI_THUNK_EXPORT PPB_InputEvent_API { public: virtual ~PPB_InputEvent_API() {} diff --git a/ppapi/thunk/ppb_url_request_info_api.h b/ppapi/thunk/ppb_url_request_info_api.h index 56634bc..a3890b1 100644 --- a/ppapi/thunk/ppb_url_request_info_api.h +++ b/ppapi/thunk/ppb_url_request_info_api.h @@ -6,6 +6,7 @@ #define PPAPI_THUNK_URL_REQUEST_INFO_API_H_ #include "ppapi/c/ppb_url_request_info.h" +#include "ppapi/thunk/ppapi_thunk_export.h" namespace ppapi { @@ -13,7 +14,7 @@ struct PPB_URLRequestInfo_Data; namespace thunk { -class PPB_URLRequestInfo_API { +class PPAPI_THUNK_EXPORT PPB_URLRequestInfo_API { public: virtual ~PPB_URLRequestInfo_API() {} diff --git a/ppapi/thunk/thunk.h b/ppapi/thunk/thunk.h index 58bede7..342a9ed 100644 --- a/ppapi/thunk/thunk.h +++ b/ppapi/thunk/thunk.h @@ -5,6 +5,8 @@ #ifndef PPAPI_THUNK_THUNK_H_ #define PPAPI_THUNK_THUNK_H_ +#include "ppapi/thunk/ppapi_thunk_export.h" + struct PPB_Audio; struct PPB_AudioConfig; struct PPB_AudioTrusted; @@ -60,56 +62,62 @@ typedef PPB_Instance PPB_Instance_1_0; namespace ppapi { namespace thunk { -const PPB_Audio* GetPPB_Audio_Thunk(); -const PPB_AudioConfig* GetPPB_AudioConfig_Thunk(); -const PPB_AudioTrusted* GetPPB_AudioTrusted_Thunk(); -const PPB_BrokerTrusted* GetPPB_Broker_Thunk(); -const PPB_Buffer_Dev* GetPPB_Buffer_Thunk(); -const PPB_BufferTrusted* GetPPB_BufferTrusted_Thunk(); -const PPB_CharSet_Dev* GetPPB_CharSet_Thunk(); -const PPB_Context3D_Dev* GetPPB_Context3D_Thunk(); -const PPB_Context3DTrusted_Dev* GetPPB_Context3DTrusted_Thunk(); -const PPB_CursorControl_Dev* GetPPB_CursorControl_Thunk(); -const PPB_DirectoryReader_Dev* GetPPB_DirectoryReader_Thunk(); -const PPB_FileChooser_Dev* GetPPB_FileChooser_Thunk(); -const PPB_FileIO* GetPPB_FileIO_Thunk(); -const PPB_FileIOTrusted* GetPPB_FileIOTrusted_Thunk(); -const PPB_FileRef* GetPPB_FileRef_Thunk(); -const PPB_FileSystem* GetPPB_FileSystem_Thunk(); -const PPB_Find_Dev* GetPPB_Find_Thunk(); -const PPB_Flash_Menu* GetPPB_Flash_Menu_Thunk(); -const PPB_Flash_NetConnector* GetPPB_Flash_NetConnector_Thunk(); -const PPB_Flash_TCPSocket* GetPPB_Flash_TCPSocket_Thunk(); -const PPB_Font_Dev* GetPPB_Font_Thunk(); -const PPB_Fullscreen_Dev* GetPPB_Fullscreen_Thunk(); -const PPB_GLESChromiumTextureMapping_Dev* +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_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(); +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(); -const PPB_Graphics2D* GetPPB_Graphics2D_Thunk(); -const PPB_Graphics3D_Dev* GetPPB_Graphics3D_Thunk(); -const PPB_Graphics3DTrusted_Dev* GetPPB_Graphics3DTrusted_Thunk(); -const PPB_InputEvent* GetPPB_InputEvent_Thunk(); -const PPB_ImageData* GetPPB_ImageData_Thunk(); -const PPB_ImageDataTrusted* GetPPB_ImageDataTrusted_Thunk(); -const PPB_Instance_1_0* GetPPB_Instance_1_0_Thunk(); -const PPB_Instance_Private* GetPPB_Instance_Private_Thunk(); -const PPB_KeyboardInputEvent* GetPPB_KeyboardInputEvent_Thunk(); -const PPB_LayerCompositor_Dev* GetPPB_LayerCompositor_Thunk(); -const PPB_QueryPolicy_Dev* GetPPB_QueryPolicy_Thunk(); -const PPB_Messaging* GetPPB_Messaging_Thunk(); -const PPB_MouseInputEvent* GetPPB_MouseInputEvent_Thunk(); -const PPB_Scrollbar_0_5_Dev* GetPPB_Scrollbar_Thunk(); -const PPB_Surface3D_Dev* GetPPB_Surface3D_Thunk(); -const PPB_Transport_Dev* GetPPB_Transport_Thunk(); -const PPB_URLLoader* GetPPB_URLLoader_Thunk(); -const PPB_URLLoaderTrusted* GetPPB_URLLoaderTrusted_Thunk(); -const PPB_URLRequestInfo* GetPPB_URLRequestInfo_Thunk(); -const PPB_URLResponseInfo* GetPPB_URLResponseInfo_Thunk(); -const PPB_VideoCapture_Dev* GetPPB_VideoCapture_Thunk(); -const PPB_VideoDecoder_Dev* GetPPB_VideoDecoder_Thunk(); -const PPB_VideoLayer_Dev* GetPPB_VideoLayer_Thunk(); -const PPB_WheelInputEvent* GetPPB_WheelInputEvent_Thunk(); -const PPB_Widget_Dev* GetPPB_Widget_Thunk(); -const PPB_Zoom_Dev* GetPPB_Zoom_Thunk(); +PPAPI_THUNK_EXPORT const PPB_Graphics2D* GetPPB_Graphics2D_Thunk(); +PPAPI_THUNK_EXPORT const PPB_Graphics3D_Dev* GetPPB_Graphics3D_Thunk(); +PPAPI_THUNK_EXPORT const PPB_Graphics3DTrusted_Dev* + 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* GetPPB_MouseInputEvent_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_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_Zoom_Dev* GetPPB_Zoom_Thunk(); } // namespace thunk } // namespace ppapi |