diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-07 18:59:27 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-07 18:59:27 +0000 |
commit | 9a57839249d238f6ecf75f6ff91e80795b144fad (patch) | |
tree | 7e5c24f82967b80ebe5580a6a87dd8a6d24a861c | |
parent | 14d5ea0999bc034e0e847170b0a1edfe444d24eb (diff) | |
download | chromium_src-9a57839249d238f6ecf75f6ff91e80795b144fad.zip chromium_src-9a57839249d238f6ecf75f6ff91e80795b144fad.tar.gz chromium_src-9a57839249d238f6ecf75f6ff91e80795b144fad.tar.bz2 |
Rename the shared_impl resource files to give them more regular names.
[ Reland of 113290 http://codereview.chromium.org/8790004 ]
I keep getting confused between things like AudioImpl and PPB_Audio_Impl. This uses _shared for the names, so now we have _impl, _proxy, and _shared which makes more sense.
I also removed the ppb_opengles2_impl file since it was just a forward to the shared version.
Review URL: http://codereview.chromium.org/8849003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113428 0039d316-1c4b-4281-b951-d872f2087c98
72 files changed, 444 insertions, 451 deletions
diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py index c3ce764..bdbd683 100755 --- a/gpu/command_buffer/build_gles2_cmd_buffer.py +++ b/gpu/command_buffer/build_gles2_cmd_buffer.py @@ -5805,10 +5805,10 @@ const size_t GLES2Util::enum_to_string_table_len_ = file.Write(_LICENSE) file.Write(_DO_NOT_EDIT_WARNING) - file.Write("#include \"ppapi/shared_impl/opengles2_impl.h\"\n\n") + file.Write("#include \"ppapi/shared_impl/ppb_opengles2_shared.h\"\n\n") file.Write("#include \"base/logging.h\"\n") file.Write("#include \"gpu/command_buffer/client/gles2_implementation.h\"\n") - file.Write("#include \"ppapi/shared_impl/graphics_3d_impl.h\"\n") + file.Write("#include \"ppapi/shared_impl/ppb_graphics_3d_shared.h\"\n") file.Write("#include \"ppapi/thunk/enter.h\"\n\n") file.Write("namespace ppapi {\n\n") @@ -5819,7 +5819,7 @@ const size_t GLES2Util::enum_to_string_table_len_ = file.Write(" thunk::EnterResource<thunk::PPB_Graphics3D_API>" " enter_g3d(context, false);\n") file.Write(" DCHECK(enter_g3d.succeeded());\n") - file.Write(" return static_cast<Graphics3DImpl*>" + file.Write(" return static_cast<PPB_Graphics3D_Shared*>" "(enter_g3d.object())->gles2_impl();\n") file.Write("}\n\n") @@ -5851,7 +5851,7 @@ const size_t GLES2Util::enum_to_string_table_len_ = file.Write("} // namespace\n") file.Write(""" -const PPB_OpenGLES2* OpenGLES2Impl::GetInterface() { +const PPB_OpenGLES2* PPB_OpenGLES2_Shared::GetInterface() { return &ppb_opengles2; } @@ -5989,7 +5989,8 @@ def main(argv): elif options.alternate_mode == "chrome_ppapi": # To trigger this action, do "make ppapi_gles_implementation" - gen.WritePepperGLES2Implementation("ppapi/shared_impl/opengles2_impl.cc") + gen.WritePepperGLES2Implementation( + "ppapi/shared_impl/ppb_opengles2_shared.cc") elif options.alternate_mode == "nacl_ppapi": gen.WritePepperGLES2NaClProxy( diff --git a/ppapi/ppapi_shared.gypi b/ppapi/ppapi_shared.gypi index 5303b49..7b67ec1 100644 --- a/ppapi/ppapi_shared.gypi +++ b/ppapi/ppapi_shared.gypi @@ -30,41 +30,47 @@ '../base/base.gyp:base', ], 'sources': [ - 'shared_impl/audio_config_impl.cc', - 'shared_impl/audio_config_impl.h', - 'shared_impl/audio_impl.cc', - 'shared_impl/audio_impl.h', - 'shared_impl/audio_input_impl.cc', - 'shared_impl/audio_input_impl.h', - 'shared_impl/char_set_impl.cc', - 'shared_impl/char_set_impl.h', - 'shared_impl/crypto_impl.cc', - 'shared_impl/file_ref_impl.cc', - 'shared_impl/file_ref_impl.h', - 'shared_impl/font_impl.cc', - 'shared_impl/font_impl.h', 'shared_impl/function_group_base.cc', 'shared_impl/function_group_base.h', - 'shared_impl/graphics_3d_impl.cc', - 'shared_impl/graphics_3d_impl.h', 'shared_impl/host_resource.h', 'shared_impl/id_assignment.cc', 'shared_impl/id_assignment.h', - 'shared_impl/image_data_impl.cc', - 'shared_impl/image_data_impl.h', - 'shared_impl/input_event_impl.cc', - 'shared_impl/input_event_impl.h', - 'shared_impl/instance_impl.cc', - 'shared_impl/instance_impl.h', - 'shared_impl/memory_impl.cc', - 'shared_impl/opengles2_impl.cc', - 'shared_impl/opengles2_impl.h', - 'shared_impl/ppapi_globals.cc', 'shared_impl/platform_file.cc', 'shared_impl/platform_file.h', + 'shared_impl/ppapi_globals.cc', 'shared_impl/ppapi_globals.h', 'shared_impl/ppapi_preferences.cc', 'shared_impl/ppapi_preferences.h', + 'shared_impl/ppb_audio_config_shared.cc', + 'shared_impl/ppb_audio_config_shared.h', + 'shared_impl/ppb_audio_input_shared.cc', + 'shared_impl/ppb_audio_input_shared.h', + 'shared_impl/ppb_audio_shared.cc', + 'shared_impl/ppb_audio_shared.h', + 'shared_impl/ppb_char_set_shared.cc', + 'shared_impl/ppb_char_set_shared.h', + 'shared_impl/ppb_crypto_shared.cc', + 'shared_impl/ppb_file_ref_shared.cc', + 'shared_impl/ppb_file_ref_shared.h', + 'shared_impl/ppb_font_shared.cc', + 'shared_impl/ppb_font_shared.h', + 'shared_impl/ppb_graphics_3d_shared.cc', + 'shared_impl/ppb_graphics_3d_shared.h', + 'shared_impl/ppb_image_data_shared.cc', + 'shared_impl/ppb_image_data_shared.h', + 'shared_impl/ppb_input_event_shared.cc', + 'shared_impl/ppb_input_event_shared.h', + 'shared_impl/ppb_instance_shared.cc', + 'shared_impl/ppb_instance_shared.h', + 'shared_impl/ppb_memory_shared.cc', + 'shared_impl/ppb_opengles2_shared.cc', + 'shared_impl/ppb_opengles2_shared.h', + 'shared_impl/ppb_url_request_info_shared.cc', + 'shared_impl/ppb_url_request_info_shared.h', + 'shared_impl/ppb_url_util_shared.cc', + 'shared_impl/ppb_url_util_shared.h', + 'shared_impl/ppb_video_decoder_shared.cc', + 'shared_impl/ppb_video_decoder_shared.h', 'shared_impl/ppp_instance_combined.cc', 'shared_impl/ppp_instance_combined.h', 'shared_impl/proxy_lock.cc', @@ -77,19 +83,12 @@ 'shared_impl/scoped_pp_resource.h', 'shared_impl/time_conversion.cc', 'shared_impl/time_conversion.h', - 'shared_impl/url_request_info_impl.cc', - 'shared_impl/url_request_info_impl.h', - 'shared_impl/url_util_impl.cc', - 'shared_impl/url_util_impl.h', 'shared_impl/var.cc', 'shared_impl/var.h', 'shared_impl/var_tracker.cc', 'shared_impl/var_tracker.h', - 'shared_impl/video_decoder_impl.cc', - 'shared_impl/video_decoder_impl.h', 'shared_impl/webkit_forwarding.cc', 'shared_impl/webkit_forwarding.h', - # TODO(viettrungluu): Split these out; it won't be used in NaCl. 'shared_impl/private/net_address_private_impl.cc', 'shared_impl/private/net_address_private_impl.h', diff --git a/ppapi/proxy/interface_list.cc b/ppapi/proxy/interface_list.cc index af36b88..a1c100e 100644 --- a/ppapi/proxy/interface_list.cc +++ b/ppapi/proxy/interface_list.cc @@ -94,7 +94,7 @@ #include "ppapi/proxy/ppp_mouse_lock_proxy.h" #include "ppapi/proxy/ppp_video_decoder_proxy.h" #include "ppapi/proxy/resource_creation_proxy.h" -#include "ppapi/shared_impl/opengles2_impl.h" +#include "ppapi/shared_impl/ppb_opengles2_shared.h" #include "ppapi/thunk/thunk.h" // Helper to get the proxy name PPB_Foo_Proxy given the API name PPB_Foo. @@ -164,7 +164,7 @@ InterfaceList::InterfaceList() { AddPPB(PPB_CORE_INTERFACE, API_ID_PPB_CORE, PPB_Core_Proxy::GetPPB_Core_Interface()); AddPPB(PPB_OPENGLES2_INTERFACE, API_ID_NONE, - OpenGLES2Impl::GetInterface()); + PPB_OpenGLES2_Shared::GetInterface()); AddPPB(PPB_VAR_INTERFACE, API_ID_NONE, GetPPB_Var_Interface()); diff --git a/ppapi/proxy/ppapi_messages.h b/ppapi/proxy/ppapi_messages.h index d6f0515..b894db9 100644 --- a/ppapi/proxy/ppapi_messages.h +++ b/ppapi/proxy/ppapi_messages.h @@ -34,9 +34,9 @@ #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" +#include "ppapi/shared_impl/ppb_input_event_shared.h" +#include "ppapi/shared_impl/ppb_url_request_info_shared.h" #undef IPC_MESSAGE_EXPORT #define IPC_MESSAGE_EXPORT PPAPI_PROXY_EXPORT diff --git a/ppapi/proxy/ppapi_param_traits.h b/ppapi/proxy/ppapi_param_traits.h index 4787dca..57706c5 100644 --- a/ppapi/proxy/ppapi_param_traits.h +++ b/ppapi/proxy/ppapi_param_traits.h @@ -14,7 +14,7 @@ #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" +#include "ppapi/shared_impl/ppb_file_ref_shared.h" struct PP_FileInfo; struct PP_ObjectProperty; diff --git a/ppapi/proxy/ppb_audio_input_proxy.cc b/ppapi/proxy/ppb_audio_input_proxy.cc index 2933edd..5126f7d 100644 --- a/ppapi/proxy/ppb_audio_input_proxy.cc +++ b/ppapi/proxy/ppb_audio_input_proxy.cc @@ -15,9 +15,9 @@ #include "ppapi/proxy/plugin_dispatcher.h" #include "ppapi/proxy/ppapi_messages.h" #include "ppapi/shared_impl/api_id.h" -#include "ppapi/shared_impl/audio_input_impl.h" #include "ppapi/shared_impl/platform_file.h" #include "ppapi/shared_impl/ppapi_globals.h" +#include "ppapi/shared_impl/ppb_audio_input_shared.h" #include "ppapi/shared_impl/resource.h" #include "ppapi/thunk/enter.h" #include "ppapi/thunk/ppb_audio_config_api.h" @@ -32,7 +32,7 @@ using ppapi::thunk::PPB_AudioConfig_API; namespace ppapi { namespace proxy { -class AudioInput : public Resource, public AudioInputImpl { +class AudioInput : public Resource, public PPB_AudioInput_Shared { public: AudioInput(const HostResource& audio_input_id, PP_Resource config_id, diff --git a/ppapi/proxy/ppb_audio_proxy.cc b/ppapi/proxy/ppb_audio_proxy.cc index 0c4ddc4..8e64c85 100644 --- a/ppapi/proxy/ppb_audio_proxy.cc +++ b/ppapi/proxy/ppb_audio_proxy.cc @@ -15,9 +15,9 @@ #include "ppapi/proxy/plugin_dispatcher.h" #include "ppapi/proxy/ppapi_messages.h" #include "ppapi/shared_impl/api_id.h" -#include "ppapi/shared_impl/audio_impl.h" #include "ppapi/shared_impl/platform_file.h" #include "ppapi/shared_impl/ppapi_globals.h" +#include "ppapi/shared_impl/ppb_audio_shared.h" #include "ppapi/shared_impl/resource.h" #include "ppapi/thunk/ppb_audio_config_api.h" #include "ppapi/thunk/enter.h" @@ -32,7 +32,7 @@ using ppapi::thunk::PPB_AudioConfig_API; namespace ppapi { namespace proxy { -class Audio : public Resource, public AudioImpl { +class Audio : public Resource, public PPB_Audio_Shared { public: Audio(const HostResource& audio_id, PP_Resource config_id, diff --git a/ppapi/proxy/ppb_file_ref_proxy.cc b/ppapi/proxy/ppb_file_ref_proxy.cc index 5f1a05f..20b522c 100644 --- a/ppapi/proxy/ppb_file_ref_proxy.cc +++ b/ppapi/proxy/ppb_file_ref_proxy.cc @@ -16,7 +16,7 @@ #include "ppapi/proxy/plugin_dispatcher.h" #include "ppapi/proxy/ppapi_messages.h" #include "ppapi/proxy/serialized_var.h" -#include "ppapi/shared_impl/file_ref_impl.h" +#include "ppapi/shared_impl/ppb_file_ref_shared.h" #include "ppapi/thunk/resource_creation_api.h" #include "ppapi/thunk/thunk.h" @@ -28,12 +28,12 @@ using ppapi::thunk::ResourceCreationAPI; namespace ppapi { namespace proxy { -class FileRef : public FileRefImpl { +class FileRef : public PPB_FileRef_Shared { public: explicit FileRef(const PPB_FileRef_CreateInfo& info); virtual ~FileRef(); - // PPB_FileRef_API implementation (not provided by FileRefImpl). + // PPB_FileRef_API implementation (not provided by PPB_FileRef_Shared). virtual PP_Resource GetParent() OVERRIDE; virtual int32_t MakeDirectory(PP_Bool make_ancestors, PP_CompletionCallback callback) OVERRIDE; @@ -72,7 +72,7 @@ class FileRef : public FileRefImpl { }; FileRef::FileRef(const PPB_FileRef_CreateInfo& info) - : FileRefImpl(FileRefImpl::InitAsProxy(), info), + : PPB_FileRef_Shared(PPB_FileRef_Shared::InitAsProxy(), info), next_callback_id_(1) { } diff --git a/ppapi/proxy/ppb_graphics_3d_proxy.h b/ppapi/proxy/ppb_graphics_3d_proxy.h index 472c2a7..887ae46 100644 --- a/ppapi/proxy/ppb_graphics_3d_proxy.h +++ b/ppapi/proxy/ppb_graphics_3d_proxy.h @@ -14,7 +14,7 @@ #include "ppapi/cpp/completion_callback.h" #include "ppapi/proxy/interface_proxy.h" #include "ppapi/proxy/proxy_non_thread_safe_ref_count.h" -#include "ppapi/shared_impl/graphics_3d_impl.h" +#include "ppapi/shared_impl/ppb_graphics_3d_shared.h" #include "ppapi/shared_impl/resource.h" namespace ppapi { @@ -23,7 +23,7 @@ class HostResource; namespace proxy { -class Graphics3D : public Resource, public Graphics3DImpl { +class Graphics3D : public Resource, public PPB_Graphics3D_Shared { public: explicit Graphics3D(const HostResource& resource); virtual ~Graphics3D(); diff --git a/ppapi/proxy/ppb_image_data_proxy.h b/ppapi/proxy/ppb_image_data_proxy.h index 9250948..6fd64f6 100644 --- a/ppapi/proxy/ppb_image_data_proxy.h +++ b/ppapi/proxy/ppb_image_data_proxy.h @@ -15,7 +15,7 @@ #include "ppapi/c/pp_var.h" #include "ppapi/proxy/interface_proxy.h" #include "ppapi/proxy/serialized_structs.h" -#include "ppapi/shared_impl/image_data_impl.h" +#include "ppapi/shared_impl/ppb_image_data_shared.h" #include "ppapi/shared_impl/resource.h" #include "ppapi/thunk/ppb_image_data_api.h" @@ -36,7 +36,7 @@ namespace proxy { // public in the header since a number of other resources need to access it. class ImageData : public ppapi::Resource, public ppapi::thunk::PPB_ImageData_API, - public ppapi::ImageDataImpl { + public ppapi::PPB_ImageData_Shared { public: ImageData(const ppapi::HostResource& resource, const PP_ImageDataDesc& desc, diff --git a/ppapi/proxy/ppb_instance_proxy.cc b/ppapi/proxy/ppb_instance_proxy.cc index 28bb17e..af417e8 100644 --- a/ppapi/proxy/ppb_instance_proxy.cc +++ b/ppapi/proxy/ppb_instance_proxy.cc @@ -15,7 +15,7 @@ #include "ppapi/proxy/ppapi_messages.h" #include "ppapi/proxy/serialized_var.h" #include "ppapi/shared_impl/ppapi_globals.h" -#include "ppapi/shared_impl/url_util_impl.h" +#include "ppapi/shared_impl/ppb_url_util_shared.h" #include "ppapi/thunk/enter.h" #include "ppapi/thunk/thunk.h" @@ -317,8 +317,9 @@ PP_Var PPB_Instance_Proxy::ResolveRelativeToDocument( API_ID_PPB_INSTANCE, instance, SerializedVarSendInput(dispatcher(), relative), &result)); - return URLUtilImpl::ConvertComponentsAndReturnURL(result.Return(dispatcher()), - components); + return PPB_URLUtil_Shared::ConvertComponentsAndReturnURL( + result.Return(dispatcher()), + components); } PP_Bool PPB_Instance_Proxy::DocumentCanRequest(PP_Instance instance, @@ -344,8 +345,9 @@ PP_Var PPB_Instance_Proxy::GetDocumentURL(PP_Instance instance, ReceiveSerializedVarReturnValue result; dispatcher()->Send(new PpapiHostMsg_PPBInstance_GetDocumentURL( API_ID_PPB_INSTANCE, instance, &result)); - return URLUtilImpl::ConvertComponentsAndReturnURL(result.Return(dispatcher()), - components); + return PPB_URLUtil_Shared::ConvertComponentsAndReturnURL( + result.Return(dispatcher()), + components); } PP_Var PPB_Instance_Proxy::GetPluginInstanceURL( @@ -354,8 +356,9 @@ PP_Var PPB_Instance_Proxy::GetPluginInstanceURL( ReceiveSerializedVarReturnValue result; dispatcher()->Send(new PpapiHostMsg_PPBInstance_GetPluginInstanceURL( API_ID_PPB_INSTANCE, instance, &result)); - return URLUtilImpl::ConvertComponentsAndReturnURL(result.Return(dispatcher()), - components); + return PPB_URLUtil_Shared::ConvertComponentsAndReturnURL( + result.Return(dispatcher()), + components); } void PPB_Instance_Proxy::PostMessage(PP_Instance instance, diff --git a/ppapi/proxy/ppb_instance_proxy.h b/ppapi/proxy/ppb_instance_proxy.h index 5de8f9e..eeb791c 100644 --- a/ppapi/proxy/ppb_instance_proxy.h +++ b/ppapi/proxy/ppb_instance_proxy.h @@ -13,7 +13,7 @@ #include "ppapi/proxy/proxy_non_thread_safe_ref_count.h" #include "ppapi/shared_impl/function_group_base.h" #include "ppapi/shared_impl/host_resource.h" -#include "ppapi/shared_impl/instance_impl.h" +#include "ppapi/shared_impl/ppb_instance_shared.h" #include "ppapi/thunk/ppb_instance_api.h" // Windows headers interfere with this file. @@ -29,8 +29,8 @@ class SerializedVarOutParam; class SerializedVarReturnValue; class PPB_Instance_Proxy : public InterfaceProxy, - public ppapi::InstanceImpl, - public ppapi::thunk::PPB_Instance_FunctionAPI { + public PPB_Instance_Shared, + public thunk::PPB_Instance_FunctionAPI { public: PPB_Instance_Proxy(Dispatcher* dispatcher); virtual ~PPB_Instance_Proxy(); diff --git a/ppapi/proxy/ppb_testing_proxy.cc b/ppapi/proxy/ppb_testing_proxy.cc index d9f90f2..bb9bad0 100644 --- a/ppapi/proxy/ppb_testing_proxy.cc +++ b/ppapi/proxy/ppb_testing_proxy.cc @@ -165,10 +165,10 @@ void PPB_Testing_Proxy::OnMsgGetLiveObjectsForInstance(PP_Instance instance, void PPB_Testing_Proxy::OnMsgSimulateInputEvent( PP_Instance instance, const InputEventData& input_event) { - scoped_refptr<InputEventImpl> input_event_impl( - new InputEventImpl(InputEventImpl::InitAsProxy(), - instance, - input_event)); + scoped_refptr<PPB_InputEvent_Shared> input_event_impl( + new PPB_InputEvent_Shared(PPB_InputEvent_Shared::InitAsProxy(), + instance, + input_event)); ppb_testing_impl_->SimulateInputEvent(instance, input_event_impl->pp_resource()); } diff --git a/ppapi/proxy/ppb_video_decoder_proxy.cc b/ppapi/proxy/ppb_video_decoder_proxy.cc index 91b91c6..850ae6e 100644 --- a/ppapi/proxy/ppb_video_decoder_proxy.cc +++ b/ppapi/proxy/ppb_video_decoder_proxy.cc @@ -23,7 +23,7 @@ using ppapi::thunk::PPB_VideoDecoder_API; namespace ppapi { namespace proxy { -class VideoDecoder : public Resource, public VideoDecoderImpl { +class VideoDecoder : public Resource, public PPB_VideoDecoder_Shared { public: // You must call Init() before using this class. explicit VideoDecoder(const HostResource& resource); @@ -132,7 +132,7 @@ void VideoDecoder::Destroy() { FlushCommandBuffer(); GetDispatcher()->Send(new PpapiHostMsg_PPBVideoDecoder_Destroy( API_ID_PPB_VIDEO_DECODER_DEV, host_resource())); - VideoDecoderImpl::Destroy(); + PPB_VideoDecoder_Shared::Destroy(); } PluginDispatcher* VideoDecoder::GetDispatcher() const { diff --git a/ppapi/proxy/ppb_video_decoder_proxy.h b/ppapi/proxy/ppb_video_decoder_proxy.h index edebb0e..1185d16 100644 --- a/ppapi/proxy/ppb_video_decoder_proxy.h +++ b/ppapi/proxy/ppb_video_decoder_proxy.h @@ -9,7 +9,7 @@ #include "ppapi/cpp/completion_callback.h" #include "ppapi/proxy/interface_proxy.h" #include "ppapi/proxy/proxy_non_thread_safe_ref_count.h" -#include "ppapi/shared_impl/video_decoder_impl.h" +#include "ppapi/shared_impl/ppb_video_decoder_shared.h" #include "ppapi/thunk/ppb_video_decoder_api.h" namespace ppapi { diff --git a/ppapi/proxy/ppp_input_event_proxy.cc b/ppapi/proxy/ppp_input_event_proxy.cc index 0215e72..cfce397 100644 --- a/ppapi/proxy/ppp_input_event_proxy.cc +++ b/ppapi/proxy/ppp_input_event_proxy.cc @@ -11,7 +11,7 @@ #include "ppapi/proxy/plugin_dispatcher.h" #include "ppapi/proxy/plugin_resource_tracker.h" #include "ppapi/proxy/ppapi_messages.h" -#include "ppapi/shared_impl/input_event_impl.h" +#include "ppapi/shared_impl/ppb_input_event_shared.h" #include "ppapi/thunk/enter.h" #include "ppapi/thunk/ppb_input_event_api.h" @@ -96,8 +96,8 @@ bool PPP_InputEvent_Proxy::OnMessageReceived(const IPC::Message& msg) { void PPP_InputEvent_Proxy::OnMsgHandleInputEvent(PP_Instance instance, const InputEventData& data) { - scoped_refptr<InputEventImpl> resource(new InputEventImpl( - InputEventImpl::InitAsProxy(), instance, data)); + scoped_refptr<PPB_InputEvent_Shared> resource(new PPB_InputEvent_Shared( + PPB_InputEvent_Shared::InitAsProxy(), instance, data)); ppp_input_event_impl_->HandleInputEvent(instance, resource->pp_resource()); } @@ -105,8 +105,8 @@ void PPP_InputEvent_Proxy::OnMsgHandleFilteredInputEvent( PP_Instance instance, const InputEventData& data, PP_Bool* result) { - scoped_refptr<InputEventImpl> resource(new InputEventImpl( - InputEventImpl::InitAsProxy(), instance, data)); + scoped_refptr<PPB_InputEvent_Shared> resource(new PPB_InputEvent_Shared( + PPB_InputEvent_Shared::InitAsProxy(), instance, data)); *result = ppp_input_event_impl_->HandleInputEvent(instance, resource->pp_resource()); } diff --git a/ppapi/proxy/resource_creation_proxy.cc b/ppapi/proxy/resource_creation_proxy.cc index 0a0846e..52cce18 100644 --- a/ppapi/proxy/resource_creation_proxy.cc +++ b/ppapi/proxy/resource_creation_proxy.cc @@ -29,12 +29,12 @@ #include "ppapi/proxy/ppb_video_capture_proxy.h" #include "ppapi/proxy/ppb_video_decoder_proxy.h" #include "ppapi/shared_impl/api_id.h" -#include "ppapi/shared_impl/audio_config_impl.h" -#include "ppapi/shared_impl/font_impl.h" #include "ppapi/shared_impl/function_group_base.h" #include "ppapi/shared_impl/host_resource.h" -#include "ppapi/shared_impl/input_event_impl.h" -#include "ppapi/shared_impl/url_request_info_impl.h" +#include "ppapi/shared_impl/ppb_audio_config_shared.h" +#include "ppapi/shared_impl/ppb_font_shared.h" +#include "ppapi/shared_impl/ppb_input_event_shared.h" +#include "ppapi/shared_impl/ppb_url_request_info_shared.h" #include "ppapi/shared_impl/var.h" #include "ppapi/thunk/enter.h" #include "ppapi/thunk/ppb_image_data_api.h" @@ -73,7 +73,7 @@ PP_Resource ResourceCreationProxy::CreateAudioConfig( PP_Instance instance, PP_AudioSampleRate sample_rate, uint32_t sample_frame_count) { - return AudioConfigImpl::CreateAsProxy( + return PPB_AudioConfig_Shared::CreateAsProxy( instance, sample_rate, sample_frame_count); } @@ -151,7 +151,7 @@ PP_Resource ResourceCreationProxy::CreateFlashNetConnector( PP_Resource ResourceCreationProxy::CreateFontObject( PP_Instance instance, const PP_FontDescription_Dev* description) { - if (!ppapi::FontImpl::IsPPFontDescriptionValid(*description)) + if (!PPB_Font_Shared::IsPPFontDescriptionValid(*description)) return 0; return (new Font(HostResource::MakeInstanceOnly(instance), *description))-> GetReference(); @@ -184,7 +184,7 @@ PP_Resource ResourceCreationProxy::CreateKeyboardInputEvent( type != PP_INPUTEVENT_TYPE_KEYUP && type != PP_INPUTEVENT_TYPE_CHAR) return 0; - ppapi::InputEventData data; + InputEventData data; data.event_type = type; data.event_time_stamp = time_stamp; data.event_modifiers = modifiers; @@ -196,8 +196,8 @@ PP_Resource ResourceCreationProxy::CreateKeyboardInputEvent( data.character_text = text_str->value(); } - return (new InputEventImpl(InputEventImpl::InitAsProxy(), - instance, data))->GetReference(); + return (new PPB_InputEvent_Shared(PPB_InputEvent_Shared::InitAsProxy(), + instance, data))->GetReference(); } PP_Resource ResourceCreationProxy::CreateMouseInputEvent( @@ -216,7 +216,7 @@ PP_Resource ResourceCreationProxy::CreateMouseInputEvent( type != PP_INPUTEVENT_TYPE_MOUSELEAVE) return 0; - ppapi::InputEventData data; + InputEventData data; data.event_type = type; data.event_time_stamp = time_stamp; data.event_modifiers = modifiers; @@ -225,8 +225,8 @@ PP_Resource ResourceCreationProxy::CreateMouseInputEvent( data.mouse_click_count = click_count; data.mouse_movement = *mouse_movement; - return (new InputEventImpl(InputEventImpl::InitAsProxy(), - instance, data))->GetReference(); + return (new PPB_InputEvent_Shared(PPB_InputEvent_Shared::InitAsProxy(), + instance, data))->GetReference(); } PP_Resource ResourceCreationProxy::CreateGraphics3D( @@ -276,7 +276,7 @@ PP_Resource ResourceCreationProxy::CreateURLLoader(PP_Instance instance) { PP_Resource ResourceCreationProxy::CreateURLRequestInfo( PP_Instance instance, const PPB_URLRequestInfo_Data& data) { - return (new URLRequestInfoImpl( + return (new PPB_URLRequestInfo_Shared( HostResource::MakeInstanceOnly(instance), data))->GetReference(); } @@ -311,7 +311,7 @@ PP_Resource ResourceCreationProxy::CreateWheelInputEvent( const PP_FloatPoint* wheel_delta, const PP_FloatPoint* wheel_ticks, PP_Bool scroll_by_page) { - ppapi::InputEventData data; + InputEventData data; data.event_type = PP_INPUTEVENT_TYPE_WHEEL; data.event_time_stamp = time_stamp; data.event_modifiers = modifiers; @@ -319,8 +319,8 @@ PP_Resource ResourceCreationProxy::CreateWheelInputEvent( data.wheel_ticks = *wheel_ticks; data.wheel_scroll_by_page = PP_ToBool(scroll_by_page); - return (new InputEventImpl(InputEventImpl::InitAsProxy(), - instance, data))->GetReference(); + return (new PPB_InputEvent_Shared(PPB_InputEvent_Shared::InitAsProxy(), + instance, data))->GetReference(); } bool ResourceCreationProxy::Send(IPC::Message* msg) { diff --git a/ppapi/shared_impl/audio_config_impl.cc b/ppapi/shared_impl/ppb_audio_config_shared.cc index 843f2d1..78df9ad 100644 --- a/ppapi/shared_impl/audio_config_impl.cc +++ b/ppapi/shared_impl/ppb_audio_config_shared.cc @@ -2,60 +2,64 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ppapi/shared_impl/audio_config_impl.h" +#include "ppapi/shared_impl/ppb_audio_config_shared.h" namespace ppapi { -AudioConfigImpl::AudioConfigImpl(PP_Instance instance) +PPB_AudioConfig_Shared::PPB_AudioConfig_Shared(PP_Instance instance) : Resource(instance), sample_rate_(PP_AUDIOSAMPLERATE_NONE), sample_frame_count_(0) { } -AudioConfigImpl::AudioConfigImpl(const HostResource& host_resource) +PPB_AudioConfig_Shared::PPB_AudioConfig_Shared( + const HostResource& host_resource) : Resource(host_resource), sample_rate_(PP_AUDIOSAMPLERATE_NONE), sample_frame_count_(0) { } -AudioConfigImpl::~AudioConfigImpl() { +PPB_AudioConfig_Shared::~PPB_AudioConfig_Shared() { } // static -PP_Resource AudioConfigImpl::CreateAsImpl(PP_Instance instance, - PP_AudioSampleRate sample_rate, - uint32_t sample_frame_count) { - scoped_refptr<AudioConfigImpl> object(new AudioConfigImpl(instance)); +PP_Resource PPB_AudioConfig_Shared::CreateAsImpl( + PP_Instance instance, + PP_AudioSampleRate sample_rate, + uint32_t sample_frame_count) { + scoped_refptr<PPB_AudioConfig_Shared> object( + new PPB_AudioConfig_Shared(instance)); if (!object->Init(sample_rate, sample_frame_count)) return 0; return object->GetReference(); } // static -PP_Resource AudioConfigImpl::CreateAsProxy(PP_Instance instance, - PP_AudioSampleRate sample_rate, - uint32_t sample_frame_count) { - scoped_refptr<AudioConfigImpl> object(new AudioConfigImpl( +PP_Resource PPB_AudioConfig_Shared::CreateAsProxy( + PP_Instance instance, + PP_AudioSampleRate sample_rate, + uint32_t sample_frame_count) { + scoped_refptr<PPB_AudioConfig_Shared> object(new PPB_AudioConfig_Shared( HostResource::MakeInstanceOnly(instance))); if (!object->Init(sample_rate, sample_frame_count)) return 0; return object->GetReference(); } -thunk::PPB_AudioConfig_API* AudioConfigImpl::AsPPB_AudioConfig_API() { +thunk::PPB_AudioConfig_API* PPB_AudioConfig_Shared::AsPPB_AudioConfig_API() { return this; } -PP_AudioSampleRate AudioConfigImpl::GetSampleRate() { +PP_AudioSampleRate PPB_AudioConfig_Shared::GetSampleRate() { return sample_rate_; } -uint32_t AudioConfigImpl::GetSampleFrameCount() { +uint32_t PPB_AudioConfig_Shared::GetSampleFrameCount() { return sample_frame_count_; } -bool AudioConfigImpl::Init(PP_AudioSampleRate sample_rate, - uint32_t sample_frame_count) { +bool PPB_AudioConfig_Shared::Init(PP_AudioSampleRate sample_rate, + uint32_t sample_frame_count) { // TODO(brettw): Currently we don't actually check what the hardware // supports, so just allow sample rates of the "guaranteed working" ones. if (sample_rate != PP_AUDIOSAMPLERATE_44100 && diff --git a/ppapi/shared_impl/audio_config_impl.h b/ppapi/shared_impl/ppb_audio_config_shared.h index 7577e00..65e3b2b 100644 --- a/ppapi/shared_impl/audio_config_impl.h +++ b/ppapi/shared_impl/ppb_audio_config_shared.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef PPAPI_SHARED_IMPL_AUDIO_CONFIG_IMPL_H_ -#define PPAPI_SHARED_IMPL_AUDIO_CONFIG_IMPL_H_ +#ifndef PPAPI_SHARED_IMPL_PPB_AUDIO_CONFIG_SHARED_H_ +#define PPAPI_SHARED_IMPL_PPB_AUDIO_CONFIG_SHARED_H_ #include "base/basictypes.h" #include "base/compiler_specific.h" @@ -12,11 +12,11 @@ namespace ppapi { -class PPAPI_SHARED_EXPORT AudioConfigImpl +class PPAPI_SHARED_EXPORT PPB_AudioConfig_Shared : public Resource, public thunk::PPB_AudioConfig_API { public: - virtual ~AudioConfigImpl(); + virtual ~PPB_AudioConfig_Shared(); static PP_Resource CreateAsImpl(PP_Instance instance, PP_AudioSampleRate sample_rate, @@ -34,8 +34,10 @@ class PPAPI_SHARED_EXPORT AudioConfigImpl private: // You must call Init before using this object. - explicit AudioConfigImpl(PP_Instance instance); // Impl c'tor. - explicit AudioConfigImpl(const HostResource& host_resource); // Proxy c'tor. + // Construct as implementation. + explicit PPB_AudioConfig_Shared(PP_Instance instance); + // Construct as proxy. + explicit PPB_AudioConfig_Shared(const HostResource& host_resource); // Returns false if the arguments are invalid, the object should not be // used in this case. @@ -44,9 +46,9 @@ class PPAPI_SHARED_EXPORT AudioConfigImpl PP_AudioSampleRate sample_rate_; uint32_t sample_frame_count_; - DISALLOW_COPY_AND_ASSIGN(AudioConfigImpl); + DISALLOW_COPY_AND_ASSIGN(PPB_AudioConfig_Shared); }; } // namespace ppapi -#endif // PPAPI_SHARED_IMPL_AUDIO_CONFIG_IMPL_H_ +#endif // PPAPI_SHARED_IMPL_PPB_AUDIO_CONFIG_SHARED_H_ diff --git a/ppapi/shared_impl/audio_input_impl.cc b/ppapi/shared_impl/ppb_audio_input_shared.cc index 659cd47..ae5b37e 100644 --- a/ppapi/shared_impl/audio_input_impl.cc +++ b/ppapi/shared_impl/ppb_audio_input_shared.cc @@ -2,20 +2,20 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ppapi/shared_impl/audio_input_impl.h" +#include "ppapi/shared_impl/ppb_audio_input_shared.h" #include "base/logging.h" namespace ppapi { -AudioInputImpl::AudioInputImpl() +PPB_AudioInput_Shared::PPB_AudioInput_Shared() : capturing_(false), shared_memory_size_(0), callback_(NULL), user_data_(NULL) { } -AudioInputImpl::~AudioInputImpl() { +PPB_AudioInput_Shared::~PPB_AudioInput_Shared() { // Closing the socket causes the thread to exit - wait for it. if (socket_.get()) socket_->Close(); @@ -25,13 +25,13 @@ AudioInputImpl::~AudioInputImpl() { } } -void AudioInputImpl::SetCallback(PPB_AudioInput_Callback callback, - void* user_data) { +void PPB_AudioInput_Shared::SetCallback(PPB_AudioInput_Callback callback, + void* user_data) { callback_ = callback; user_data_ = user_data; } -void AudioInputImpl::SetStartCaptureState() { +void PPB_AudioInput_Shared::SetStartCaptureState() { DCHECK(!capturing_); DCHECK(!audio_input_thread_.get()); @@ -45,7 +45,7 @@ void AudioInputImpl::SetStartCaptureState() { capturing_ = true; } -void AudioInputImpl::SetStopCaptureState() { +void PPB_AudioInput_Shared::SetStopCaptureState() { DCHECK(capturing_); if (audio_input_thread_.get()) { @@ -55,7 +55,7 @@ void AudioInputImpl::SetStopCaptureState() { capturing_ = false; } -void AudioInputImpl::SetStreamInfo( +void PPB_AudioInput_Shared::SetStreamInfo( base::SharedMemoryHandle shared_memory_handle, size_t shared_memory_size, base::SyncSocket::Handle socket_handle) { @@ -72,7 +72,7 @@ void AudioInputImpl::SetStreamInfo( } } -void AudioInputImpl::StartThread() { +void PPB_AudioInput_Shared::StartThread() { DCHECK(callback_); DCHECK(!audio_input_thread_.get()); audio_input_thread_.reset(new base::DelegateSimpleThread( @@ -80,7 +80,7 @@ void AudioInputImpl::StartThread() { audio_input_thread_->Start(); } -void AudioInputImpl::Run() { +void PPB_AudioInput_Shared::Run() { int pending_data; void* buffer = shared_memory_->memory(); diff --git a/ppapi/shared_impl/audio_input_impl.h b/ppapi/shared_impl/ppb_audio_input_shared.h index e7604c3..5c5e88d 100644 --- a/ppapi/shared_impl/audio_input_impl.h +++ b/ppapi/shared_impl/ppb_audio_input_shared.h @@ -2,9 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef PPAPI_SHARED_IMPL_AUDIO_INPUT_IMPL_H_ -#define PPAPI_SHARED_IMPL_AUDIO_INPUT_IMPL_H_ +#ifndef PPAPI_SHARED_IMPL_PPB_AUDIO_INPUT_SHARED_H_ +#define PPAPI_SHARED_IMPL_PPB_AUDIO_INPUT_SHARED_H_ +#include "base/basictypes.h" #include "base/memory/scoped_ptr.h" #include "base/shared_memory.h" #include "base/sync_socket.h" @@ -18,12 +19,12 @@ 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 PPAPI_SHARED_EXPORT AudioInputImpl +class PPAPI_SHARED_EXPORT PPB_AudioInput_Shared : public thunk::PPB_AudioInput_API, public base::DelegateSimpleThread::Delegate { public: - AudioInputImpl(); - virtual ~AudioInputImpl(); + PPB_AudioInput_Shared(); + virtual ~PPB_AudioInput_Shared(); bool capturing() const { return capturing_; } @@ -81,8 +82,10 @@ class PPAPI_SHARED_EXPORT AudioInputImpl // User data pointer passed verbatim to the callback function. void* user_data_; + + DISALLOW_COPY_AND_ASSIGN(PPB_AudioInput_Shared); }; } // namespace ppapi -#endif // PPAPI_SHARED_IMPL_AUDIO_INPUT_IMPL_H_ +#endif // PPAPI_SHARED_IMPL_PPB_AUDIO_INPUT_SHARED_H_ diff --git a/ppapi/shared_impl/audio_impl.cc b/ppapi/shared_impl/ppb_audio_shared.cc index b684ab1..5385106 100644 --- a/ppapi/shared_impl/audio_impl.cc +++ b/ppapi/shared_impl/ppb_audio_shared.cc @@ -2,20 +2,20 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ppapi/shared_impl/audio_impl.h" +#include "ppapi/shared_impl/ppb_audio_shared.h" #include "base/logging.h" namespace ppapi { -AudioImpl::AudioImpl() +PPB_Audio_Shared::PPB_Audio_Shared() : playing_(false), shared_memory_size_(0), callback_(NULL), user_data_(NULL) { } -AudioImpl::~AudioImpl() { +PPB_Audio_Shared::~PPB_Audio_Shared() { // Closing the socket causes the thread to exit - wait for it. if (socket_.get()) socket_->Close(); @@ -25,12 +25,13 @@ AudioImpl::~AudioImpl() { } } -void AudioImpl::SetCallback(PPB_Audio_Callback callback, void* user_data) { +void PPB_Audio_Shared::SetCallback(PPB_Audio_Callback callback, + void* user_data) { callback_ = callback; user_data_ = user_data; } -void AudioImpl::SetStartPlaybackState() { +void PPB_Audio_Shared::SetStartPlaybackState() { DCHECK(!playing_); DCHECK(!audio_thread_.get()); @@ -44,7 +45,7 @@ void AudioImpl::SetStartPlaybackState() { playing_ = true; } -void AudioImpl::SetStopPlaybackState() { +void PPB_Audio_Shared::SetStopPlaybackState() { DCHECK(playing_); if (audio_thread_.get()) { @@ -54,9 +55,10 @@ void AudioImpl::SetStopPlaybackState() { playing_ = false; } -void AudioImpl::SetStreamInfo(base::SharedMemoryHandle shared_memory_handle, - size_t shared_memory_size, - base::SyncSocket::Handle socket_handle) { +void PPB_Audio_Shared::SetStreamInfo( + base::SharedMemoryHandle shared_memory_handle, + size_t shared_memory_size, + base::SyncSocket::Handle socket_handle) { socket_.reset(new base::SyncSocket(socket_handle)); shared_memory_.reset(new base::SharedMemory(shared_memory_handle, false)); shared_memory_size_ = shared_memory_size; @@ -70,7 +72,7 @@ void AudioImpl::SetStreamInfo(base::SharedMemoryHandle shared_memory_handle, } } -void AudioImpl::StartThread() { +void PPB_Audio_Shared::StartThread() { DCHECK(callback_); DCHECK(!audio_thread_.get()); audio_thread_.reset(new base::DelegateSimpleThread( @@ -78,7 +80,7 @@ void AudioImpl::StartThread() { audio_thread_->Start(); } -void AudioImpl::Run() { +void PPB_Audio_Shared::Run() { int pending_data; void* buffer = shared_memory_->memory(); diff --git a/ppapi/shared_impl/audio_impl.h b/ppapi/shared_impl/ppb_audio_shared.h index 201582d..99f45de 100644 --- a/ppapi/shared_impl/audio_impl.h +++ b/ppapi/shared_impl/ppb_audio_shared.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef PPAPI_SHARED_IMPL_AUDIO_IMPL_H_ -#define PPAPI_SHARED_IMPL_AUDIO_IMPL_H_ +#ifndef PPAPI_SHARED_IMPL_PPB_AUDIO_SHARED_H_ +#define PPAPI_SHARED_IMPL_PPB_AUDIO_SHARED_H_ #include "base/memory/scoped_ptr.h" #include "base/shared_memory.h" @@ -18,12 +18,12 @@ 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 PPAPI_SHARED_EXPORT AudioImpl +class PPAPI_SHARED_EXPORT PPB_Audio_Shared : public thunk::PPB_Audio_API, public base::DelegateSimpleThread::Delegate { public: - AudioImpl(); - virtual ~AudioImpl(); + PPB_Audio_Shared(); + virtual ~PPB_Audio_Shared(); bool playing() const { return playing_; } @@ -80,8 +80,10 @@ class PPAPI_SHARED_EXPORT AudioImpl // User data pointer passed verbatim to the callback function. void* user_data_; + + DISALLOW_COPY_AND_ASSIGN(PPB_Audio_Shared); }; } // namespace ppapi -#endif // PPAPI_SHARED_IMPL_AUDIO_IMPL_H_ +#endif // PPAPI_SHARED_IMPL_PPB_AUDIO_SHARED_H_ diff --git a/ppapi/shared_impl/char_set_impl.cc b/ppapi/shared_impl/ppb_char_set_shared.cc index c18d4c7..70ecd39 100644 --- a/ppapi/shared_impl/char_set_impl.cc +++ b/ppapi/shared_impl/ppb_char_set_shared.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ppapi/shared_impl/char_set_impl.h" +#include "ppapi/shared_impl/ppb_char_set_shared.h" #include "base/i18n/icu_string_conversions.h" #include "ppapi/c/dev/ppb_memory_dev.h" @@ -43,11 +43,12 @@ bool PPToBaseConversionError(PP_CharSet_ConversionError on_error, // implementation in base, so we partially duplicate the code from // icu_string_conversions.cc with the correct error handling setup required // by the PPAPI interface. -char* CharSetImpl::UTF16ToCharSet(const uint16_t* utf16, - uint32_t utf16_len, - const char* output_char_set, - PP_CharSet_ConversionError on_error, - uint32_t* output_length) { +char* PPB_CharSet_Shared::UTF16ToCharSet( + const uint16_t* utf16, + uint32_t utf16_len, + const char* output_char_set, + PP_CharSet_ConversionError on_error, + uint32_t* output_length) { if (!utf16 || !output_char_set || !output_length) return NULL; @@ -117,11 +118,12 @@ char* CharSetImpl::UTF16ToCharSet(const uint16_t* utf16, } // static -uint16_t* CharSetImpl::CharSetToUTF16(const char* input, - uint32_t input_len, - const char* input_char_set, - PP_CharSet_ConversionError on_error, - uint32_t* output_length) { +uint16_t* PPB_CharSet_Shared::CharSetToUTF16( + const char* input, + uint32_t input_len, + const char* input_char_set, + PP_CharSet_ConversionError on_error, + uint32_t* output_length) { if (!input || !input_char_set || !output_length) return NULL; diff --git a/ppapi/shared_impl/char_set_impl.h b/ppapi/shared_impl/ppb_char_set_shared.h index e6f5c10..4243267 100644 --- a/ppapi/shared_impl/char_set_impl.h +++ b/ppapi/shared_impl/ppb_char_set_shared.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef PPAPI_SHARED_IMPL_CHAR_SET_IMPL_H_ -#define PPAPI_SHARED_IMPL_CHAR_SET_IMPL_H_ +#ifndef PPAPI_SHARED_IMPL_PPB_CHAR_SET_SHARED_H_ +#define PPAPI_SHARED_IMPL_PPB_CHAR_SET_SHARED_H_ #include "base/basictypes.h" #include "ppapi/c/dev/ppb_char_set_dev.h" @@ -13,7 +13,7 @@ namespace ppapi { // Contains the implementation of character set conversion that is shared // between the proxy and the renderer. -class PPAPI_SHARED_EXPORT CharSetImpl { +class PPAPI_SHARED_EXPORT PPB_CharSet_Shared { public: static char* UTF16ToCharSet(const uint16_t* utf16, uint32_t utf16_len, @@ -30,4 +30,4 @@ class PPAPI_SHARED_EXPORT CharSetImpl { } // namespace ppapi -#endif // PPAPI_SHARED_IMPL_CHAR_SET_IMPL_H_ +#endif // PPAPI_SHARED_IMPL_PPB_CHAR_SET_SHARED_H_ diff --git a/ppapi/shared_impl/crypto_impl.cc b/ppapi/shared_impl/ppb_crypto_shared.cc index 42694d0..42694d0 100644 --- a/ppapi/shared_impl/crypto_impl.cc +++ b/ppapi/shared_impl/ppb_crypto_shared.cc diff --git a/ppapi/shared_impl/file_ref_impl.cc b/ppapi/shared_impl/ppb_file_ref_shared.cc index 274d944..6e748e1 100644 --- a/ppapi/shared_impl/file_ref_impl.cc +++ b/ppapi/shared_impl/ppb_file_ref_shared.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ppapi/shared_impl/file_ref_impl.h" +#include "ppapi/shared_impl/ppb_file_ref_shared.h" #include "base/logging.h" #include "ppapi/shared_impl/ppapi_globals.h" @@ -10,7 +10,8 @@ namespace ppapi { -FileRefImpl::FileRefImpl(const InitAsImpl&, const PPB_FileRef_CreateInfo& info) +PPB_FileRef_Shared::PPB_FileRef_Shared(const InitAsImpl&, + const PPB_FileRef_CreateInfo& info) : Resource(info.resource.instance()), create_info_(info) { // Should not have been passed a host resource for the trusted constructor. @@ -22,23 +23,24 @@ FileRefImpl::FileRefImpl(const InitAsImpl&, const PPB_FileRef_CreateInfo& info) DCHECK(!create_info_.resource.is_null()); } -FileRefImpl::FileRefImpl(const InitAsProxy&, const PPB_FileRef_CreateInfo& info) +PPB_FileRef_Shared::PPB_FileRef_Shared(const InitAsProxy&, + const PPB_FileRef_CreateInfo& info) : Resource(info.resource), create_info_(info) { } -FileRefImpl::~FileRefImpl() { +PPB_FileRef_Shared::~PPB_FileRef_Shared() { } -thunk::PPB_FileRef_API* FileRefImpl::AsPPB_FileRef_API() { +thunk::PPB_FileRef_API* PPB_FileRef_Shared::AsPPB_FileRef_API() { return this; } -PP_FileSystemType FileRefImpl::GetFileSystemType() const { +PP_FileSystemType PPB_FileRef_Shared::GetFileSystemType() const { return static_cast<PP_FileSystemType>(create_info_.file_system_type); } -PP_Var FileRefImpl::GetName() const { +PP_Var PPB_FileRef_Shared::GetName() const { if (!name_var_.get()) { name_var_ = new StringVar( PpapiGlobals::Get()->GetModuleForInstance(pp_instance()), @@ -47,7 +49,7 @@ PP_Var FileRefImpl::GetName() const { return name_var_->GetPPVar(); } -PP_Var FileRefImpl::GetPath() const { +PP_Var PPB_FileRef_Shared::GetPath() const { if (create_info_.file_system_type == PP_FILESYSTEMTYPE_EXTERNAL) return PP_MakeUndefined(); if (!path_var_.get()) { @@ -58,7 +60,7 @@ PP_Var FileRefImpl::GetPath() const { return path_var_->GetPPVar(); } -const PPB_FileRef_CreateInfo& FileRefImpl::GetCreateInfo() const { +const PPB_FileRef_CreateInfo& PPB_FileRef_Shared::GetCreateInfo() const { return create_info_; } diff --git a/ppapi/shared_impl/file_ref_impl.h b/ppapi/shared_impl/ppb_file_ref_shared.h index 58ee0fe..3d0a9f8 100644 --- a/ppapi/shared_impl/file_ref_impl.h +++ b/ppapi/shared_impl/ppb_file_ref_shared.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef PPAPI_SHARED_IMPL_FILE_REF_IMPL_H_ -#define PPAPI_SHARED_IMPL_FILE_REF_IMPL_H_ +#ifndef PPAPI_SHARED_IMPL_PPB_FILE_REF_SHARED_H_ +#define PPAPI_SHARED_IMPL_PPB_FILE_REF_SHARED_H_ #include <string> @@ -29,15 +29,16 @@ 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 PPAPI_SHARED_EXPORT FileRefImpl : public Resource, - public thunk::PPB_FileRef_API { +class PPAPI_SHARED_EXPORT PPB_FileRef_Shared + : public Resource, + public thunk::PPB_FileRef_API { public: struct InitAsImpl {}; struct InitAsProxy {}; - FileRefImpl(const InitAsImpl&, const PPB_FileRef_CreateInfo& info); - FileRefImpl(const InitAsProxy&, const PPB_FileRef_CreateInfo& info); - virtual ~FileRefImpl(); + PPB_FileRef_Shared(const InitAsImpl&, const PPB_FileRef_CreateInfo& info); + PPB_FileRef_Shared(const InitAsProxy&, const PPB_FileRef_CreateInfo& info); + virtual ~PPB_FileRef_Shared(); // Resource overrides. virtual thunk::PPB_FileRef_API* AsPPB_FileRef_API() OVERRIDE; @@ -57,9 +58,9 @@ class PPAPI_SHARED_EXPORT FileRefImpl : public Resource, mutable scoped_refptr<StringVar> name_var_; mutable scoped_refptr<StringVar> path_var_; - DISALLOW_IMPLICIT_CONSTRUCTORS(FileRefImpl); + DISALLOW_IMPLICIT_CONSTRUCTORS(PPB_FileRef_Shared); }; } // namespace ppapi -#endif // PPAPI_SHARED_IMPL_FILE_REF_IMPL_H_ +#endif // PPAPI_SHARED_IMPL_PPB_FILE_REF_SHARED_H_ diff --git a/ppapi/shared_impl/font_impl.cc b/ppapi/shared_impl/ppb_font_shared.cc index 66ac5a6..a714643 100644 --- a/ppapi/shared_impl/font_impl.cc +++ b/ppapi/shared_impl/ppb_font_shared.cc @@ -2,14 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ppapi/shared_impl/font_impl.h" +#include "ppapi/shared_impl/ppb_font_shared.h" #include "ppapi/c/dev/ppb_font_dev.h" namespace ppapi { // static -bool FontImpl::IsPPFontDescriptionValid(const PP_FontDescription_Dev& desc) { +bool PPB_Font_Shared::IsPPFontDescriptionValid( + const PP_FontDescription_Dev& desc) { // Check validity of string. We can't check the actual text since we could // be on the wrong thread and don't know if we're in the plugin or the host. if (desc.face.type != PP_VARTYPE_STRING && diff --git a/ppapi/shared_impl/font_impl.h b/ppapi/shared_impl/ppb_font_shared.h index a8ab2df..af0f681 100644 --- a/ppapi/shared_impl/font_impl.h +++ b/ppapi/shared_impl/ppb_font_shared.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef PPAPI_SHARED_IMPL_FONT_IMPL_H_ -#define PPAPI_SHARED_IMPL_FONT_IMPL_H_ +#ifndef PPAPI_SHARED_IMPL_PPB_FONT_SHARED_H_ +#define PPAPI_SHARED_IMPL_PPB_FONT_SHARED_H_ #pragma once #include <string> @@ -18,15 +18,15 @@ struct PP_FontDescription_Dev; namespace ppapi { -class PPAPI_SHARED_EXPORT FontImpl { +class PPAPI_SHARED_EXPORT PPB_Font_Shared { public: // Validates the parameters in thee description. Can be called on any thread. static bool IsPPFontDescriptionValid(const PP_FontDescription_Dev& desc); private: - DISALLOW_COPY_AND_ASSIGN(FontImpl); + DISALLOW_COPY_AND_ASSIGN(PPB_Font_Shared); }; } // namespace ppapi -#endif // PPAPI_SHARED_IMPL_FONT_IMPL_H_ +#endif // PPAPI_SHARED_IMPL_PPB_FONT_SHARED_H_ diff --git a/ppapi/shared_impl/graphics_3d_impl.cc b/ppapi/shared_impl/ppb_graphics_3d_shared.cc index 00555de..9e0c155 100644 --- a/ppapi/shared_impl/graphics_3d_impl.cc +++ b/ppapi/shared_impl/ppb_graphics_3d_shared.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ppapi/shared_impl/graphics_3d_impl.h" +#include "ppapi/shared_impl/ppb_graphics_3d_shared.h" #include "base/logging.h" #include "gpu/command_buffer/client/gles2_cmd_helper.h" @@ -11,34 +11,34 @@ namespace ppapi { -Graphics3DImpl::Graphics3DImpl() +PPB_Graphics3D_Shared::PPB_Graphics3D_Shared() : transfer_buffer_id_(-1), swap_callback_(PP_BlockUntilComplete()) { } -Graphics3DImpl::~Graphics3DImpl() { +PPB_Graphics3D_Shared::~PPB_Graphics3D_Shared() { // Make sure that GLES2 implementation has already been destroyed. DCHECK_EQ(transfer_buffer_id_, -1); DCHECK(!gles2_helper_.get()); DCHECK(!gles2_impl_.get()); } -int32_t Graphics3DImpl::GetAttribs(int32_t* attrib_list) { +int32_t PPB_Graphics3D_Shared::GetAttribs(int32_t* attrib_list) { // TODO(alokp): Implement me. return PP_ERROR_FAILED; } -int32_t Graphics3DImpl::SetAttribs(int32_t* attrib_list) { +int32_t PPB_Graphics3D_Shared::SetAttribs(int32_t* attrib_list) { // TODO(alokp): Implement me. return PP_ERROR_FAILED; } -int32_t Graphics3DImpl::GetError() { +int32_t PPB_Graphics3D_Shared::GetError() { // TODO(alokp): Implement me. return PP_ERROR_FAILED; } -int32_t Graphics3DImpl::ResizeBuffers(int32_t width, int32_t height) { +int32_t PPB_Graphics3D_Shared::ResizeBuffers(int32_t width, int32_t height) { if ((width < 0) || (height < 0)) return PP_ERROR_BADARGUMENT; @@ -47,7 +47,7 @@ int32_t Graphics3DImpl::ResizeBuffers(int32_t width, int32_t height) { return PP_OK; } -int32_t Graphics3DImpl::SwapBuffers(PP_CompletionCallback callback) { +int32_t PPB_Graphics3D_Shared::SwapBuffers(PP_CompletionCallback callback) { if (!callback.func) { // Blocking SwapBuffers isn't supported (since we have to be on the main // thread). @@ -63,30 +63,30 @@ int32_t Graphics3DImpl::SwapBuffers(PP_CompletionCallback callback) { return DoSwapBuffers(); } -void* Graphics3DImpl::MapTexSubImage2DCHROMIUM(GLenum target, - GLint level, - GLint xoffset, - GLint yoffset, - GLsizei width, - GLsizei height, - GLenum format, - GLenum type, - GLenum access) { +void* PPB_Graphics3D_Shared::MapTexSubImage2DCHROMIUM(GLenum target, + GLint level, + GLint xoffset, + GLint yoffset, + GLsizei width, + GLsizei height, + GLenum format, + GLenum type, + GLenum access) { return gles2_impl_->MapTexSubImage2DCHROMIUM( target, level, xoffset, yoffset, width, height, format, type, access); } -void Graphics3DImpl::UnmapTexSubImage2DCHROMIUM(const void* mem) { +void PPB_Graphics3D_Shared::UnmapTexSubImage2DCHROMIUM(const void* mem) { gles2_impl_->UnmapTexSubImage2DCHROMIUM(mem); } -void Graphics3DImpl::SwapBuffersACK(int32_t pp_error) { +void PPB_Graphics3D_Shared::SwapBuffersACK(int32_t pp_error) { DCHECK(HasPendingSwap()); PP_RunAndClearCompletionCallback(&swap_callback_, pp_error); } -bool Graphics3DImpl::CreateGLES2Impl(int32 command_buffer_size, - int32 transfer_buffer_size) { +bool PPB_Graphics3D_Shared::CreateGLES2Impl(int32 command_buffer_size, + int32 transfer_buffer_size) { gpu::CommandBuffer* command_buffer = GetCommandBuffer(); DCHECK(command_buffer); @@ -120,7 +120,7 @@ bool Graphics3DImpl::CreateGLES2Impl(int32 command_buffer_size, return true; } -void Graphics3DImpl::DestroyGLES2Impl() { +void PPB_Graphics3D_Shared::DestroyGLES2Impl() { gles2_impl_.reset(); if (transfer_buffer_id_ != -1) { diff --git a/ppapi/shared_impl/graphics_3d_impl.h b/ppapi/shared_impl/ppb_graphics_3d_shared.h index 07fe967..6f3a04f 100644 --- a/ppapi/shared_impl/graphics_3d_impl.h +++ b/ppapi/shared_impl/ppb_graphics_3d_shared.h @@ -21,7 +21,8 @@ class GLES2Implementation; namespace ppapi { -class PPAPI_SHARED_EXPORT Graphics3DImpl : public thunk::PPB_Graphics3D_API { +class PPAPI_SHARED_EXPORT PPB_Graphics3D_Shared + : public thunk::PPB_Graphics3D_API { public: // PPB_Graphics3D_API implementation. virtual int32_t GetAttribs(int32_t* attrib_list) OVERRIDE; @@ -48,8 +49,8 @@ class PPAPI_SHARED_EXPORT Graphics3DImpl : public thunk::PPB_Graphics3D_API { void SwapBuffersACK(int32_t pp_error); protected: - Graphics3DImpl(); - virtual ~Graphics3DImpl(); + PPB_Graphics3D_Shared(); + virtual ~PPB_Graphics3D_Shared(); virtual gpu::CommandBuffer* GetCommandBuffer() = 0; virtual int32 DoSwapBuffers() = 0; @@ -67,7 +68,7 @@ class PPAPI_SHARED_EXPORT Graphics3DImpl : public thunk::PPB_Graphics3D_API { // Callback that needs to be executed when swap-buffers is completed. PP_CompletionCallback swap_callback_; - DISALLOW_COPY_AND_ASSIGN(Graphics3DImpl); + DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Shared); }; } // namespace ppapi diff --git a/ppapi/shared_impl/image_data_impl.cc b/ppapi/shared_impl/ppb_image_data_shared.cc index e07d2cb..b0935e4 100644 --- a/ppapi/shared_impl/image_data_impl.cc +++ b/ppapi/shared_impl/ppb_image_data_shared.cc @@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ppapi/shared_impl/image_data_impl.h" +#include "ppapi/shared_impl/ppb_image_data_shared.h" #include "third_party/skia/include/core/SkTypes.h" namespace ppapi { // static -PP_ImageDataFormat ImageDataImpl::GetNativeImageDataFormat() { +PP_ImageDataFormat PPB_ImageData_Shared::GetNativeImageDataFormat() { if (SK_B32_SHIFT == 0) return PP_IMAGEDATAFORMAT_BGRA_PREMUL; else if (SK_R32_SHIFT == 0) @@ -19,7 +19,8 @@ PP_ImageDataFormat ImageDataImpl::GetNativeImageDataFormat() { } // static -bool ImageDataImpl::IsImageDataFormatSupported(PP_ImageDataFormat format) { +bool PPB_ImageData_Shared::IsImageDataFormatSupported( + PP_ImageDataFormat format) { return format == PP_IMAGEDATAFORMAT_BGRA_PREMUL || format == PP_IMAGEDATAFORMAT_RGBA_PREMUL; } diff --git a/ppapi/shared_impl/image_data_impl.h b/ppapi/shared_impl/ppb_image_data_shared.h index f931c78..4f9a4d5 100644 --- a/ppapi/shared_impl/image_data_impl.h +++ b/ppapi/shared_impl/ppb_image_data_shared.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef PPAPI_SHARED_IMPL_IMAGE_DATA_IMPL_H_ -#define PPAPI_SHARED_IMPL_IMAGE_DATA_IMPL_H_ +#ifndef PPAPI_SHARED_IMPL_PPB_IMAGE_DATA_SHARED_H_ +#define PPAPI_SHARED_IMPL_PPB_IMAGE_DATA_SHARED_H_ #include "ppapi/c/pp_bool.h" #include "ppapi/c/ppb_image_data.h" @@ -20,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 PPAPI_SHARED_EXPORT ImageDataImpl { +class PPAPI_SHARED_EXPORT PPB_ImageData_Shared { public: static PP_ImageDataFormat GetNativeImageDataFormat(); static bool IsImageDataFormatSupported(PP_ImageDataFormat format); @@ -28,4 +28,4 @@ class PPAPI_SHARED_EXPORT ImageDataImpl { } // namespace ppapi -#endif // PPAPI_SHARED_IMPL_IMAGE_DATA_IMPL_H_ +#endif // PPAPI_SHARED_IMPL_PPB_IMAGE_DATA_SHARED_H_ diff --git a/ppapi/shared_impl/input_event_impl.cc b/ppapi/shared_impl/ppb_input_event_shared.cc index d502a62..962f701 100644 --- a/ppapi/shared_impl/input_event_impl.cc +++ b/ppapi/shared_impl/ppb_input_event_shared.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ppapi/shared_impl/input_event_impl.h" +#include "ppapi/shared_impl/ppb_input_event_shared.h" #include "ppapi/shared_impl/ppapi_globals.h" #include "ppapi/shared_impl/var.h" @@ -33,95 +33,95 @@ InputEventData::InputEventData() InputEventData::~InputEventData() { } -InputEventImpl::InputEventImpl(const InitAsImpl&, - PP_Instance instance, - const InputEventData& data) +PPB_InputEvent_Shared::PPB_InputEvent_Shared(const InitAsImpl&, + PP_Instance instance, + const InputEventData& data) : Resource(instance), data_(data) { } -InputEventImpl::InputEventImpl(const InitAsProxy&, - PP_Instance instance, - const InputEventData& data) +PPB_InputEvent_Shared::PPB_InputEvent_Shared(const InitAsProxy&, + PP_Instance instance, + const InputEventData& data) : Resource(HostResource::MakeInstanceOnly(instance)), data_(data) { } -PPB_InputEvent_API* InputEventImpl::AsPPB_InputEvent_API() { +PPB_InputEvent_API* PPB_InputEvent_Shared::AsPPB_InputEvent_API() { return this; } -const InputEventData& InputEventImpl::GetInputEventData() const { +const InputEventData& PPB_InputEvent_Shared::GetInputEventData() const { return data_; } -PP_InputEvent_Type InputEventImpl::GetType() { +PP_InputEvent_Type PPB_InputEvent_Shared::GetType() { return data_.event_type; } -PP_TimeTicks InputEventImpl::GetTimeStamp() { +PP_TimeTicks PPB_InputEvent_Shared::GetTimeStamp() { return data_.event_time_stamp; } -uint32_t InputEventImpl::GetModifiers() { +uint32_t PPB_InputEvent_Shared::GetModifiers() { return data_.event_modifiers; } -PP_InputEvent_MouseButton InputEventImpl::GetMouseButton() { +PP_InputEvent_MouseButton PPB_InputEvent_Shared::GetMouseButton() { return data_.mouse_button; } -PP_Point InputEventImpl::GetMousePosition() { +PP_Point PPB_InputEvent_Shared::GetMousePosition() { return data_.mouse_position; } -int32_t InputEventImpl::GetMouseClickCount() { +int32_t PPB_InputEvent_Shared::GetMouseClickCount() { return data_.mouse_click_count; } -PP_Point InputEventImpl::GetMouseMovement() { +PP_Point PPB_InputEvent_Shared::GetMouseMovement() { return data_.mouse_movement; } -PP_FloatPoint InputEventImpl::GetWheelDelta() { +PP_FloatPoint PPB_InputEvent_Shared::GetWheelDelta() { return data_.wheel_delta; } -PP_FloatPoint InputEventImpl::GetWheelTicks() { +PP_FloatPoint PPB_InputEvent_Shared::GetWheelTicks() { return data_.wheel_ticks; } -PP_Bool InputEventImpl::GetWheelScrollByPage() { +PP_Bool PPB_InputEvent_Shared::GetWheelScrollByPage() { return PP_FromBool(data_.wheel_scroll_by_page); } -uint32_t InputEventImpl::GetKeyCode() { +uint32_t PPB_InputEvent_Shared::GetKeyCode() { return data_.key_code; } -PP_Var InputEventImpl::GetCharacterText() { +PP_Var PPB_InputEvent_Shared::GetCharacterText() { return StringVar::StringToPPVar( PpapiGlobals::Get()->GetModuleForInstance(pp_instance()), data_.character_text); } -uint32_t InputEventImpl::GetIMESegmentNumber() { +uint32_t PPB_InputEvent_Shared::GetIMESegmentNumber() { if (data_.composition_segment_offsets.empty()) return 0; return data_.composition_segment_offsets.size() - 1; } -uint32_t InputEventImpl::GetIMESegmentOffset(uint32_t index) { +uint32_t PPB_InputEvent_Shared::GetIMESegmentOffset(uint32_t index) { if (index >= data_.composition_segment_offsets.size()) return 0; return data_.composition_segment_offsets[index]; } -int32_t InputEventImpl::GetIMETargetSegment() { +int32_t PPB_InputEvent_Shared::GetIMETargetSegment() { return data_.composition_target_segment; } -void InputEventImpl::GetIMESelection(uint32_t* start, uint32_t* end) { +void PPB_InputEvent_Shared::GetIMESelection(uint32_t* start, uint32_t* end) { if (start) *start = data_.composition_selection_start; if (end) diff --git a/ppapi/shared_impl/input_event_impl.h b/ppapi/shared_impl/ppb_input_event_shared.h index 094eb8c..1a29750 100644 --- a/ppapi/shared_impl/input_event_impl.h +++ b/ppapi/shared_impl/ppb_input_event_shared.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef PPAPI_SHARED_IMPL_INPUT_EVENT_IMPL_H_ -#define PPAPI_SHARED_IMPL_INPUT_EVENT_IMPL_H_ +#ifndef PPAPI_SHARED_IMPL_PPB_INPUT_EVENT_SHARED_H_ +#define PPAPI_SHARED_IMPL_PPB_INPUT_EVENT_SHARED_H_ #include <string> #include <vector> @@ -51,7 +51,7 @@ struct PPAPI_SHARED_EXPORT InputEventData { // This simple class implements the PPB_InputEvent_API in terms of the // shared InputEventData structure -class PPAPI_SHARED_EXPORT InputEventImpl +class PPAPI_SHARED_EXPORT PPB_InputEvent_Shared : public Resource, public thunk::PPB_InputEvent_API { public: @@ -60,12 +60,12 @@ class PPAPI_SHARED_EXPORT InputEventImpl // The dummy arguments control which version of Resource's constructor is // called for this base class. - InputEventImpl(const InitAsImpl&, - PP_Instance instance, - const InputEventData& data); - InputEventImpl(const InitAsProxy&, - PP_Instance instance, - const InputEventData& data); + PPB_InputEvent_Shared(const InitAsImpl&, + PP_Instance instance, + const InputEventData& data); + PPB_InputEvent_Shared(const InitAsProxy&, + PP_Instance instance, + const InputEventData& data); // Resource overrides. virtual PPB_InputEvent_API* AsPPB_InputEvent_API() OVERRIDE; @@ -92,9 +92,9 @@ class PPAPI_SHARED_EXPORT InputEventImpl private: InputEventData data_; - DISALLOW_IMPLICIT_CONSTRUCTORS(InputEventImpl); + DISALLOW_IMPLICIT_CONSTRUCTORS(PPB_InputEvent_Shared); }; } // namespace ppapi -#endif // PPAPI_SHARED_IMPL_INPUT_EVENT_IMPL_H_ +#endif // PPAPI_SHARED_IMPL_PPB_INPUT_EVENT_SHARED_H_ diff --git a/ppapi/shared_impl/instance_impl.cc b/ppapi/shared_impl/ppb_instance_shared.cc index ad1674a..a2416ce 100644 --- a/ppapi/shared_impl/instance_impl.cc +++ b/ppapi/shared_impl/ppb_instance_shared.cc @@ -2,18 +2,19 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ppapi/shared_impl/instance_impl.h" +#include "ppapi/shared_impl/ppb_instance_shared.h" #include "ppapi/c/pp_errors.h" #include "ppapi/c/ppb_input_event.h" namespace ppapi { -InstanceImpl::~InstanceImpl() { +PPB_Instance_Shared::~PPB_Instance_Shared() { } -int32_t InstanceImpl::ValidateRequestInputEvents(bool is_filtering, - uint32_t event_classes) { +int32_t PPB_Instance_Shared::ValidateRequestInputEvents( + bool is_filtering, + uint32_t event_classes) { // See if any bits are set we don't know about. if (event_classes & ~static_cast<uint32_t>(PP_INPUTEVENT_CLASS_MOUSE | diff --git a/ppapi/shared_impl/instance_impl.h b/ppapi/shared_impl/ppb_instance_shared.h index fdc741f..353a822 100644 --- a/ppapi/shared_impl/instance_impl.h +++ b/ppapi/shared_impl/ppb_instance_shared.h @@ -2,17 +2,17 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef PPAPI_SHARED_IMPL_INSTANCE_IMPL_H_ -#define PPAPI_SHARED_IMPL_INSTANCE_IMPL_H_ +#ifndef PPAPI_SHARED_IMPL_PPB_INSTANCE_SHARED_H_ +#define PPAPI_SHARED_IMPL_PPB_INSTANCE_SHARED_H_ #include "ppapi/c/pp_stdint.h" #include "ppapi/shared_impl/ppapi_shared_export.h" namespace ppapi { -class PPAPI_SHARED_EXPORT InstanceImpl { +class PPAPI_SHARED_EXPORT PPB_Instance_Shared { public: - virtual ~InstanceImpl(); + virtual ~PPB_Instance_Shared(); // Error checks the given resquest to Request[Filtering]InputEvents. Returns // PP_OK if the given classes are all valid, PP_ERROR_NOTSUPPORTED if not. @@ -21,4 +21,4 @@ class PPAPI_SHARED_EXPORT InstanceImpl { } // namespace ppapi -#endif // PPAPI_SHARED_IMPL_INSTANCE_IMPL_H_ +#endif // PPAPI_SHARED_IMPL_PPB_INSTANCE_SHARED_H_ diff --git a/ppapi/shared_impl/memory_impl.cc b/ppapi/shared_impl/ppb_memory_shared.cc index 2cf8aa7..2cf8aa7 100644 --- a/ppapi/shared_impl/memory_impl.cc +++ b/ppapi/shared_impl/ppb_memory_shared.cc diff --git a/ppapi/shared_impl/opengles2_impl.cc b/ppapi/shared_impl/ppb_opengles2_shared.cc index 2743d2e..635ea41 100644 --- a/ppapi/shared_impl/opengles2_impl.cc +++ b/ppapi/shared_impl/ppb_opengles2_shared.cc @@ -6,11 +6,11 @@ // gpu/command_buffer/build_gles2_cmd_buffer.py // DO NOT EDIT! -#include "ppapi/shared_impl/opengles2_impl.h" +#include "ppapi/shared_impl/ppb_opengles2_shared.h" #include "base/logging.h" #include "gpu/command_buffer/client/gles2_implementation.h" -#include "ppapi/shared_impl/graphics_3d_impl.h" +#include "ppapi/shared_impl/ppb_graphics_3d_shared.h" #include "ppapi/thunk/enter.h" namespace ppapi { @@ -20,7 +20,7 @@ namespace { gpu::gles2::GLES2Implementation* GetGLES(PP_Resource context) { thunk::EnterResource<thunk::PPB_Graphics3D_API> enter_g3d(context, false); DCHECK(enter_g3d.succeeded()); - return static_cast<Graphics3DImpl*>(enter_g3d.object())->gles2_impl(); + return static_cast<PPB_Graphics3D_Shared*>(enter_g3d.object())->gles2_impl(); } void ActiveTexture(PP_Resource context_id, GLenum texture) { @@ -891,7 +891,7 @@ const struct PPB_OpenGLES2 ppb_opengles2 = { } // namespace -const PPB_OpenGLES2* OpenGLES2Impl::GetInterface() { +const PPB_OpenGLES2* PPB_OpenGLES2_Shared::GetInterface() { return &ppb_opengles2; } diff --git a/ppapi/shared_impl/opengles2_impl.h b/ppapi/shared_impl/ppb_opengles2_shared.h index 4ed6e90..2b4c9f9 100644 --- a/ppapi/shared_impl/opengles2_impl.h +++ b/ppapi/shared_impl/ppb_opengles2_shared.h @@ -2,20 +2,20 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef PPAPI_SHARED_IMPL_OPENGLES2_IMPL_H_ -#define PPAPI_SHARED_IMPL_OPENGLES2_IMPL_H_ +#ifndef PPAPI_SHARED_IMPL_PPB_OPENGLES2_SHARED_H_ +#define PPAPI_SHARED_IMPL_PPB_OPENGLES2_SHARED_H_ #include "ppapi/c/ppb_opengles2.h" #include "ppapi/shared_impl/ppapi_shared_export.h" namespace ppapi { -class PPAPI_SHARED_EXPORT OpenGLES2Impl { +class PPAPI_SHARED_EXPORT PPB_OpenGLES2_Shared { public: static const PPB_OpenGLES2* GetInterface(); }; } // namespace ppapi -#endif // PPAPI_SHARED_IMPL_OPENGLES2_IMPL_H_ +#endif // PPAPI_SHARED_IMPL_PPB_OPENGLES2_SHARED_H_ diff --git a/ppapi/shared_impl/url_request_info_impl.cc b/ppapi/shared_impl/ppb_url_request_info_shared.cc index 5802102..f582eac 100644 --- a/ppapi/shared_impl/url_request_info_impl.cc +++ b/ppapi/shared_impl/ppb_url_request_info_shared.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ppapi/shared_impl/url_request_info_impl.h" +#include "ppapi/shared_impl/ppb_url_request_info_shared.h" #include "base/string_util.h" #include "ppapi/shared_impl/var.h" @@ -70,27 +70,30 @@ PPB_URLRequestInfo_Data::PPB_URLRequestInfo_Data() PPB_URLRequestInfo_Data::~PPB_URLRequestInfo_Data() { } -URLRequestInfoImpl::URLRequestInfoImpl(PP_Instance instance, - const PPB_URLRequestInfo_Data& data) +PPB_URLRequestInfo_Shared::PPB_URLRequestInfo_Shared( + PP_Instance instance, + const PPB_URLRequestInfo_Data& data) : Resource(instance), data_(data) { } -URLRequestInfoImpl::URLRequestInfoImpl(const HostResource& host_resource, - const PPB_URLRequestInfo_Data& data) +PPB_URLRequestInfo_Shared::PPB_URLRequestInfo_Shared( + const HostResource& host_resource, + const PPB_URLRequestInfo_Data& data) : Resource(host_resource), data_(data) { } -URLRequestInfoImpl::~URLRequestInfoImpl() { +PPB_URLRequestInfo_Shared::~PPB_URLRequestInfo_Shared() { } -thunk::PPB_URLRequestInfo_API* URLRequestInfoImpl::AsPPB_URLRequestInfo_API() { +thunk::PPB_URLRequestInfo_API* +PPB_URLRequestInfo_Shared::AsPPB_URLRequestInfo_API() { return this; } -PP_Bool URLRequestInfoImpl::SetProperty(PP_URLRequestProperty property, - PP_Var var) { +PP_Bool PPB_URLRequestInfo_Shared::SetProperty(PP_URLRequestProperty property, + PP_Var var) { // IMPORTANT: Do not do security validation of parameters at this level // without also adding them to PPB_URLRequestInfo_Impl::ValidateData. This // code is used both in the plugin (which we don't trust) and in the renderer @@ -132,7 +135,8 @@ PP_Bool URLRequestInfoImpl::SetProperty(PP_URLRequestProperty property, return result; } -PP_Bool URLRequestInfoImpl::AppendDataToBody(const void* data, uint32_t len) { +PP_Bool PPB_URLRequestInfo_Shared::AppendDataToBody(const void* data, + uint32_t len) { if (len > 0) { data_.body.push_back(PPB_URLRequestInfo_Data::BodyItem( std::string(static_cast<const char*>(data), len))); @@ -140,7 +144,7 @@ PP_Bool URLRequestInfoImpl::AppendDataToBody(const void* data, uint32_t len) { return PP_TRUE; } -PP_Bool URLRequestInfoImpl::AppendFileToBody( +PP_Bool PPB_URLRequestInfo_Shared::AppendFileToBody( PP_Resource file_ref, int64_t start_offset, int64_t number_of_bytes, @@ -165,11 +169,12 @@ PP_Bool URLRequestInfoImpl::AppendFileToBody( return PP_TRUE; } -const PPB_URLRequestInfo_Data& URLRequestInfoImpl::GetData() const { +const PPB_URLRequestInfo_Data& PPB_URLRequestInfo_Shared::GetData() const { return data_; } -bool URLRequestInfoImpl::SetUndefinedProperty(PP_URLRequestProperty property) { +bool PPB_URLRequestInfo_Shared::SetUndefinedProperty( + PP_URLRequestProperty property) { // IMPORTANT: Do not do security validation of parameters at this level // without also adding them to PPB_URLRequestInfo_Impl::ValidateData. See // SetProperty() above for why. @@ -187,8 +192,9 @@ bool URLRequestInfoImpl::SetUndefinedProperty(PP_URLRequestProperty property) { } } -bool URLRequestInfoImpl::SetBooleanProperty(PP_URLRequestProperty property, - bool value) { +bool PPB_URLRequestInfo_Shared::SetBooleanProperty( + PP_URLRequestProperty property, + bool value) { // IMPORTANT: Do not do security validation of parameters at this level // without also adding them to PPB_URLRequestInfo_Impl::ValidateData. See // SetProperty() above for why. @@ -216,8 +222,9 @@ bool URLRequestInfoImpl::SetBooleanProperty(PP_URLRequestProperty property, } } -bool URLRequestInfoImpl::SetIntegerProperty(PP_URLRequestProperty property, - int32_t value) { +bool PPB_URLRequestInfo_Shared::SetIntegerProperty( + PP_URLRequestProperty property, + int32_t value) { // IMPORTANT: Do not do security validation of parameters at this level // without also adding them to PPB_URLRequestInfo_Impl::ValidateData. See // SetProperty() above for why. @@ -233,8 +240,9 @@ bool URLRequestInfoImpl::SetIntegerProperty(PP_URLRequestProperty property, } } -bool URLRequestInfoImpl::SetStringProperty(PP_URLRequestProperty property, - const std::string& value) { +bool PPB_URLRequestInfo_Shared::SetStringProperty( + PP_URLRequestProperty property, + const std::string& value) { // IMPORTANT: Do not do security validation of parameters at this level // without also adding them to PPB_URLRequestInfo_Impl::ValidateData. See // SetProperty() above for why. diff --git a/ppapi/shared_impl/url_request_info_impl.h b/ppapi/shared_impl/ppb_url_request_info_shared.h index 67e2e49..c07b9c9 100644 --- a/ppapi/shared_impl/url_request_info_impl.h +++ b/ppapi/shared_impl/ppb_url_request_info_shared.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef PPAPI_SHARED_IMPL_URL_REQUEST_INFO_IMPL_H_ -#define PPAPI_SHARED_IMPL_URL_REQUEST_INFO_IMPL_H_ +#ifndef PPAPI_SHARED_IMPL_PPB_URL_REQUEST_INFO_SHARED_H_ +#define PPAPI_SHARED_IMPL_PPB_URL_REQUEST_INFO_SHARED_H_ #include <string> #include <vector> @@ -86,16 +86,16 @@ struct PPAPI_SHARED_EXPORT PPB_URLRequestInfo_Data { // ppapi_messages.h }; -class PPAPI_SHARED_EXPORT URLRequestInfoImpl +class PPAPI_SHARED_EXPORT PPB_URLRequestInfo_Shared : public ::ppapi::Resource, public ::ppapi::thunk::PPB_URLRequestInfo_API { public: // This constructor initializes the object as a proxy object with the given // host resource. - URLRequestInfoImpl(const HostResource& host_resource, + PPB_URLRequestInfo_Shared(const HostResource& host_resource, const PPB_URLRequestInfo_Data& data); - ~URLRequestInfoImpl(); + ~PPB_URLRequestInfo_Shared(); // Resource overrides. virtual thunk::PPB_URLRequestInfo_API* AsPPB_URLRequestInfo_API() OVERRIDE; @@ -113,7 +113,7 @@ class PPAPI_SHARED_EXPORT URLRequestInfoImpl protected: // Constructor used by the webkit implementation. - URLRequestInfoImpl(PP_Instance instance, + PPB_URLRequestInfo_Shared(PP_Instance instance, const PPB_URLRequestInfo_Data& data); bool SetUndefinedProperty(PP_URLRequestProperty property); @@ -128,9 +128,9 @@ class PPAPI_SHARED_EXPORT URLRequestInfoImpl private: PPB_URLRequestInfo_Data data_; - DISALLOW_IMPLICIT_CONSTRUCTORS(URLRequestInfoImpl); + DISALLOW_IMPLICIT_CONSTRUCTORS(PPB_URLRequestInfo_Shared); }; } // namespace ppapi -#endif // PPAPI_SHARED_IMPL_URL_REQUEST_INFO_IMPL_H_ +#endif // PPAPI_SHARED_IMPL_PPB_URL_REQUEST_INFO_SHARED_H_ diff --git a/ppapi/shared_impl/url_util_impl.cc b/ppapi/shared_impl/ppb_url_util_shared.cc index fdccdb6..bdc4950 100644 --- a/ppapi/shared_impl/url_util_impl.cc +++ b/ppapi/shared_impl/ppb_url_util_shared.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ppapi/shared_impl/url_util_impl.h" +#include "ppapi/shared_impl/ppb_url_util_shared.h" #include "googleurl/src/gurl.h" #include "ppapi/shared_impl/ppapi_globals.h" @@ -43,8 +43,8 @@ void ConvertComponents(const url_parse::Parsed& input, } // namespace // static -PP_Var URLUtilImpl::Canonicalize(PP_Var url, - PP_URLComponents_Dev* components) { +PP_Var PPB_URLUtil_Shared::Canonicalize(PP_Var url, + PP_URLComponents_Dev* components) { StringVar* url_string = StringVar::FromPPVar(url); if (!url_string) return PP_MakeNull(); @@ -53,9 +53,10 @@ PP_Var URLUtilImpl::Canonicalize(PP_Var url, } // static -PP_Var URLUtilImpl::ResolveRelativeToURL(PP_Var base_url, - PP_Var relative, - PP_URLComponents_Dev* components) { +PP_Var PPB_URLUtil_Shared::ResolveRelativeToURL( + PP_Var base_url, + PP_Var relative, + PP_URLComponents_Dev* components) { StringVar* base_url_string = StringVar::FromPPVar(base_url); StringVar* relative_string = StringVar::FromPPVar(relative); if (!base_url_string || !relative_string) @@ -70,7 +71,7 @@ PP_Var URLUtilImpl::ResolveRelativeToURL(PP_Var base_url, } // static -PP_Bool URLUtilImpl::IsSameSecurityOrigin(PP_Var url_a, PP_Var url_b) { +PP_Bool PPB_URLUtil_Shared::IsSameSecurityOrigin(PP_Var url_a, PP_Var url_b) { StringVar* url_a_string = StringVar::FromPPVar(url_a); StringVar* url_b_string = StringVar::FromPPVar(url_b); if (!url_a_string || !url_b_string) @@ -86,16 +87,17 @@ PP_Bool URLUtilImpl::IsSameSecurityOrigin(PP_Var url_a, PP_Var url_b) { // Used for returning the given GURL from a PPAPI function, with an optional // out param indicating the components. -PP_Var URLUtilImpl::GenerateURLReturn(PP_Module module, - const GURL& url, - PP_URLComponents_Dev* components) { +PP_Var PPB_URLUtil_Shared::GenerateURLReturn( + PP_Module module, + const GURL& url, + PP_URLComponents_Dev* components) { if (!url.is_valid()) return PP_MakeNull(); ConvertComponents(url.parsed_for_possibly_invalid_spec(), components); return StringVar::StringToPPVar(module, url.possibly_invalid_spec()); } -PP_Var URLUtilImpl::ConvertComponentsAndReturnURL( +PP_Var PPB_URLUtil_Shared::ConvertComponentsAndReturnURL( const PP_Var& url, PP_URLComponents_Dev* components) { if (!components) diff --git a/ppapi/shared_impl/url_util_impl.h b/ppapi/shared_impl/ppb_url_util_shared.h index b7fae83..54c7573 100644 --- a/ppapi/shared_impl/url_util_impl.h +++ b/ppapi/shared_impl/ppb_url_util_shared.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef PPAPI_SHARED_IMPL_URL_UTIL_IMPL_H_ -#define PPAPI_SHARED_IMPL_URL_UTIL_IMPL_H_ +#ifndef PPAPI_SHARED_IMPL_PPB_URL_UTIL_SHARED_H_ +#define PPAPI_SHARED_IMPL_PPB_URL_UTIL_SHARED_H_ #include <string> @@ -20,7 +20,7 @@ namespace ppapi { // Contains the implementation of PPB_URLUtil that is shared between the proxy // and the renderer. -class PPAPI_SHARED_EXPORT URLUtilImpl { +class PPAPI_SHARED_EXPORT PPB_URLUtil_Shared { public: // PPB_URLUtil shared functions. static PP_Var Canonicalize(PP_Var url, @@ -50,4 +50,4 @@ class PPAPI_SHARED_EXPORT URLUtilImpl { } // namespace ppapi -#endif +#endif // PPAPI_SHARED_IMPL_PPB_URL_UTIL_SHARED_H_ diff --git a/ppapi/shared_impl/video_decoder_impl.cc b/ppapi/shared_impl/ppb_video_decoder_shared.cc index 1ab0a39..190654e 100644 --- a/ppapi/shared_impl/video_decoder_impl.cc +++ b/ppapi/shared_impl/ppb_video_decoder_shared.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ppapi/shared_impl/video_decoder_impl.h" +#include "ppapi/shared_impl/ppb_video_decoder_shared.h" #include "base/logging.h" #include "gpu/command_buffer/client/gles2_implementation.h" @@ -12,17 +12,17 @@ namespace ppapi { -VideoDecoderImpl::VideoDecoderImpl() +PPB_VideoDecoder_Shared::PPB_VideoDecoder_Shared() : flush_callback_(PP_MakeCompletionCallback(NULL, NULL)), reset_callback_(PP_MakeCompletionCallback(NULL, NULL)), graphics_context_(0), gles2_impl_(NULL) { } -VideoDecoderImpl::~VideoDecoderImpl() { +PPB_VideoDecoder_Shared::~PPB_VideoDecoder_Shared() { } -void VideoDecoderImpl::InitCommon( +void PPB_VideoDecoder_Shared::InitCommon( PP_Resource graphics_context, gpu::gles2::GLES2Implementation* gles2_impl) { DCHECK(graphics_context); @@ -32,13 +32,13 @@ void VideoDecoderImpl::InitCommon( graphics_context_ = graphics_context; } -void VideoDecoderImpl::Destroy() { +void PPB_VideoDecoder_Shared::Destroy() { graphics_context_ = 0; gles2_impl_ = NULL; PpapiGlobals::Get()->GetResourceTracker()->ReleaseResource(graphics_context_); } -bool VideoDecoderImpl::SetFlushCallback(PP_CompletionCallback callback) { +bool PPB_VideoDecoder_Shared::SetFlushCallback(PP_CompletionCallback callback) { CHECK(callback.func); if (flush_callback_.func) return false; @@ -46,7 +46,7 @@ bool VideoDecoderImpl::SetFlushCallback(PP_CompletionCallback callback) { return true; } -bool VideoDecoderImpl::SetResetCallback(PP_CompletionCallback callback) { +bool PPB_VideoDecoder_Shared::SetResetCallback(PP_CompletionCallback callback) { CHECK(callback.func); if (reset_callback_.func) return false; @@ -54,23 +54,23 @@ bool VideoDecoderImpl::SetResetCallback(PP_CompletionCallback callback) { return true; } -bool VideoDecoderImpl::SetBitstreamBufferCallback( +bool PPB_VideoDecoder_Shared::SetBitstreamBufferCallback( int32 bitstream_buffer_id, PP_CompletionCallback callback) { return bitstream_buffer_callbacks_.insert( std::make_pair(bitstream_buffer_id, callback)).second; } -void VideoDecoderImpl::RunFlushCallback(int32 result) { +void PPB_VideoDecoder_Shared::RunFlushCallback(int32 result) { DCHECK(flush_callback_.func); PP_RunAndClearCompletionCallback(&flush_callback_, result); } -void VideoDecoderImpl::RunResetCallback(int32 result) { +void PPB_VideoDecoder_Shared::RunResetCallback(int32 result) { DCHECK(reset_callback_.func); PP_RunAndClearCompletionCallback(&reset_callback_, result); } -void VideoDecoderImpl::RunBitstreamBufferCallback( +void PPB_VideoDecoder_Shared::RunBitstreamBufferCallback( int32 bitstream_buffer_id, int32 result) { CallbackById::iterator it = bitstream_buffer_callbacks_.find(bitstream_buffer_id); @@ -80,7 +80,7 @@ void VideoDecoderImpl::RunBitstreamBufferCallback( PP_RunCompletionCallback(&cc, PP_OK); } -void VideoDecoderImpl::FlushCommandBuffer() { +void PPB_VideoDecoder_Shared::FlushCommandBuffer() { if (gles2_impl_) gles2_impl_->Flush(); } diff --git a/ppapi/shared_impl/video_decoder_impl.h b/ppapi/shared_impl/ppb_video_decoder_shared.h index 754dd75..55b629c 100644 --- a/ppapi/shared_impl/video_decoder_impl.h +++ b/ppapi/shared_impl/ppb_video_decoder_shared.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef PPAPI_SHARED_IMPL_VIDEO_DECODER_IMPL_H_ -#define PPAPI_SHARED_IMPL_VIDEO_DECODER_IMPL_H_ +#ifndef PPAPI_SHARED_IMPL_PPB_VIDEO_DECODER_SHARED_H_ +#define PPAPI_SHARED_IMPL_PPB_VIDEO_DECODER_SHARED_H_ #include <map> #include <vector> @@ -24,11 +24,11 @@ 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 PPAPI_SHARED_EXPORT VideoDecoderImpl +class PPAPI_SHARED_EXPORT PPB_VideoDecoder_Shared : NON_EXPORTED_BASE(public thunk::PPB_VideoDecoder_API) { public: - VideoDecoderImpl(); - virtual ~VideoDecoderImpl(); + PPB_VideoDecoder_Shared(); + virtual ~PPB_VideoDecoder_Shared(); // PPB_VideoDecoder_API implementation. virtual void Destroy() OVERRIDE; @@ -69,9 +69,9 @@ class PPAPI_SHARED_EXPORT VideoDecoderImpl // process only, so gles2_impl_ is NULL in that case. gpu::gles2::GLES2Implementation* gles2_impl_; - DISALLOW_COPY_AND_ASSIGN(VideoDecoderImpl); + DISALLOW_COPY_AND_ASSIGN(PPB_VideoDecoder_Shared); }; } // namespace ppapi -#endif // PPAPI_SHARED_IMPL_VIDEO_DECODER_IMPL_H_ +#endif // PPAPI_SHARED_IMPL_PPB_VIDEO_DECODER_SHARED_H_ diff --git a/ppapi/thunk/ppb_char_set_thunk.cc b/ppapi/thunk/ppb_char_set_thunk.cc index 3e240e8..27419b4 100644 --- a/ppapi/thunk/ppb_char_set_thunk.cc +++ b/ppapi/thunk/ppb_char_set_thunk.cc @@ -3,7 +3,7 @@ // found in the LICENSE file. #include "ppapi/c/pp_var.h" -#include "ppapi/shared_impl/char_set_impl.h" +#include "ppapi/shared_impl/ppb_char_set_shared.h" #include "ppapi/thunk/thunk.h" #include "ppapi/thunk/enter.h" @@ -34,8 +34,8 @@ char* UTF16ToCharSet(PP_Instance instance, if (enter.failed()) return NULL; - return CharSetImpl::UTF16ToCharSet(utf16, utf16_len, output_char_set, - on_error, output_length); + return PPB_CharSet_Shared::UTF16ToCharSet(utf16, utf16_len, output_char_set, + on_error, output_length); } uint16_t* CharSetToUTF16(PP_Instance instance, @@ -49,8 +49,8 @@ uint16_t* CharSetToUTF16(PP_Instance instance, if (enter.failed()) return NULL; - return CharSetImpl::CharSetToUTF16(input, input_len, input_char_set, - on_error, output_length); + return PPB_CharSet_Shared::CharSetToUTF16(input, input_len, input_char_set, + on_error, output_length); } PP_Var GetDefaultCharSet(PP_Instance instance) { diff --git a/ppapi/thunk/ppb_image_data_thunk.cc b/ppapi/thunk/ppb_image_data_thunk.cc index 7941ab6..00d9184 100644 --- a/ppapi/thunk/ppb_image_data_thunk.cc +++ b/ppapi/thunk/ppb_image_data_thunk.cc @@ -4,7 +4,7 @@ #include "ppapi/c/pp_errors.h" #include "ppapi/c/ppb_image_data.h" -#include "ppapi/shared_impl/image_data_impl.h" +#include "ppapi/shared_impl/ppb_image_data_shared.h" #include "ppapi/thunk/enter.h" #include "ppapi/thunk/ppb_image_data_api.h" #include "ppapi/thunk/resource_creation_api.h" @@ -16,11 +16,11 @@ namespace thunk { namespace { PP_ImageDataFormat GetNativeImageDataFormat() { - return ppapi::ImageDataImpl::GetNativeImageDataFormat(); + return ppapi::PPB_ImageData_Shared::GetNativeImageDataFormat(); } PP_Bool IsImageDataFormatSupported(PP_ImageDataFormat format) { - return ppapi::ImageDataImpl::IsImageDataFormatSupported(format) + return ppapi::PPB_ImageData_Shared::IsImageDataFormatSupported(format) ? PP_TRUE : PP_FALSE; } diff --git a/ppapi/thunk/ppb_url_request_info_thunk.cc b/ppapi/thunk/ppb_url_request_info_thunk.cc index 4f41881..a5cca10 100644 --- a/ppapi/thunk/ppb_url_request_info_thunk.cc +++ b/ppapi/thunk/ppb_url_request_info_thunk.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ppapi/shared_impl/url_request_info_impl.h" +#include "ppapi/shared_impl/ppb_url_request_info_shared.h" #include "ppapi/thunk/thunk.h" #include "ppapi/thunk/enter.h" #include "ppapi/thunk/ppb_url_request_info_api.h" diff --git a/ppapi/thunk/ppb_url_util_thunk.cc b/ppapi/thunk/ppb_url_util_thunk.cc index 1a6b4a8..f1dbc27 100644 --- a/ppapi/thunk/ppb_url_util_thunk.cc +++ b/ppapi/thunk/ppb_url_util_thunk.cc @@ -3,7 +3,7 @@ // found in the LICENSE file. #include "ppapi/c/pp_errors.h" -#include "ppapi/shared_impl/url_util_impl.h" +#include "ppapi/shared_impl/ppb_url_util_shared.h" #include "ppapi/thunk/enter.h" #include "ppapi/thunk/ppb_instance_api.h" #include "ppapi/thunk/thunk.h" @@ -54,10 +54,10 @@ PP_Var GetPluginInstanceURL(PP_Instance instance, } const PPB_URLUtil_Dev g_ppb_url_util = { - &URLUtilImpl::Canonicalize, - &URLUtilImpl::ResolveRelativeToURL, + &PPB_URLUtil_Shared::Canonicalize, + &PPB_URLUtil_Shared::ResolveRelativeToURL, &ResolveRelativeToDocument, - &URLUtilImpl::IsSameSecurityOrigin, + &PPB_URLUtil_Shared::IsSameSecurityOrigin, &DocumentCanRequest, &DocumentCanAccessDocument, &GetDocumentURL, diff --git a/webkit/glue/webkit_glue.gypi b/webkit/glue/webkit_glue.gypi index 014acc4..571c7be 100644 --- a/webkit/glue/webkit_glue.gypi +++ b/webkit/glue/webkit_glue.gypi @@ -285,8 +285,6 @@ '../plugins/ppapi/ppb_image_data_impl.h', '../plugins/ppapi/ppb_layer_compositor_impl.cc', '../plugins/ppapi/ppb_layer_compositor_impl.h', - '../plugins/ppapi/ppb_opengles_impl.cc', - '../plugins/ppapi/ppb_opengles_impl.h', '../plugins/ppapi/ppb_proxy_impl.cc', '../plugins/ppapi/ppb_proxy_impl.h', '../plugins/ppapi/ppb_scrollbar_impl.cc', diff --git a/webkit/plugins/ppapi/event_conversion.cc b/webkit/plugins/ppapi/event_conversion.cc index 5411671..d78ad39 100644 --- a/webkit/plugins/ppapi/event_conversion.cc +++ b/webkit/plugins/ppapi/event_conversion.cc @@ -13,7 +13,7 @@ #include "base/utf_string_conversions.h" #include "base/utf_string_conversion_utils.h" #include "ppapi/c/pp_input_event.h" -#include "ppapi/shared_impl/input_event_impl.h" +#include "ppapi/shared_impl/ppb_input_event_shared.h" #include "ppapi/shared_impl/time_conversion.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" diff --git a/webkit/plugins/ppapi/plugin_module.cc b/webkit/plugins/ppapi/plugin_module.cc index 87bc066..fc5b2a1 100644 --- a/webkit/plugins/ppapi/plugin_module.cc +++ b/webkit/plugins/ppapi/plugin_module.cc @@ -83,7 +83,8 @@ #include "ppapi/c/trusted/ppb_graphics_3d_trusted.h" #include "ppapi/c/trusted/ppb_image_data_trusted.h" #include "ppapi/c/trusted/ppb_url_loader_trusted.h" -#include "ppapi/shared_impl/input_event_impl.h" +#include "ppapi/shared_impl/ppb_input_event_shared.h" +#include "ppapi/shared_impl/ppb_opengles2_shared.h" #include "ppapi/shared_impl/time_conversion.h" #include "ppapi/thunk/enter.h" #include "ppapi/thunk/thunk.h" @@ -105,7 +106,6 @@ #include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h" #include "webkit/plugins/ppapi/ppb_image_data_impl.h" #include "webkit/plugins/ppapi/ppb_layer_compositor_impl.h" -#include "webkit/plugins/ppapi/ppb_opengles_impl.h" #include "webkit/plugins/ppapi/ppb_proxy_impl.h" #include "webkit/plugins/ppapi/ppb_scrollbar_impl.h" #include "webkit/plugins/ppapi/ppb_uma_private_impl.h" @@ -314,7 +314,7 @@ const void* GetInterface(const char* name) { if (strcmp(name, PPB_INSTANCE_PRIVATE_INTERFACE) == 0) return ::ppapi::thunk::GetPPB_Instance_Private_Thunk(); if (strcmp(name, PPB_OPENGLES2_INTERFACE) == 0) - return PPB_OpenGLES_Impl::GetInterface(); + return ::ppapi::PPB_OpenGLES2_Shared::GetInterface(); if (strcmp(name, PPB_PROXY_PRIVATE_INTERFACE) == 0) return PPB_Proxy_Impl::GetInterface(); if (strcmp(name, PPB_UMA_PRIVATE_INTERFACE) == 0) diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.cc b/webkit/plugins/ppapi/ppapi_plugin_instance.cc index f116d6c..92882f9 100644 --- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc +++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc @@ -34,10 +34,10 @@ #include "ppapi/c/ppp_mouse_lock.h" #include "ppapi/c/private/ppb_instance_private.h" #include "ppapi/c/private/ppp_instance_private.h" -#include "ppapi/shared_impl/input_event_impl.h" +#include "ppapi/shared_impl/ppb_input_event_shared.h" +#include "ppapi/shared_impl/ppb_url_util_shared.h" #include "ppapi/shared_impl/resource.h" #include "ppapi/shared_impl/time_conversion.h" -#include "ppapi/shared_impl/url_util_impl.h" #include "ppapi/shared_impl/var.h" #include "ppapi/thunk/enter.h" #include "ppapi/thunk/ppb_buffer_api.h" @@ -101,7 +101,7 @@ using base::StringPrintf; using ppapi::InputEventData; -using ppapi::InputEventImpl; +using ppapi::PPB_InputEvent_Shared; using ppapi::PpapiGlobals; using ppapi::StringVar; using ppapi::thunk::EnterResourceNoLock; @@ -588,9 +588,9 @@ bool PluginInstance::SendCompositionEventWithUnderlineInformationToPlugin( event.is_filtered = true; else handled = true; // Unfiltered events are assumed to be handled. - scoped_refptr<InputEventImpl> event_resource( - new InputEventImpl(InputEventImpl::InitAsImpl(), - pp_instance(), event)); + scoped_refptr<PPB_InputEvent_Shared> event_resource( + new PPB_InputEvent_Shared(PPB_InputEvent_Shared::InitAsImpl(), + pp_instance(), event)); handled |= PP_ToBool(plugin_input_event_interface_->HandleInputEvent( pp_instance(), event_resource->pp_resource())); return handled; @@ -687,9 +687,9 @@ bool PluginInstance::HandleInputEvent(const WebKit::WebInputEvent& event, events[i].is_filtered = true; else rv = true; // Unfiltered events are assumed to be handled. - scoped_refptr<InputEventImpl> event_resource( - new InputEventImpl(InputEventImpl::InitAsImpl(), - pp_instance(), events[i])); + scoped_refptr<PPB_InputEvent_Shared> event_resource( + new PPB_InputEvent_Shared(PPB_InputEvent_Shared::InitAsImpl(), + pp_instance(), events[i])); rv |= PP_ToBool(plugin_input_event_interface_->HandleInputEvent( pp_instance(), event_resource->pp_resource())); @@ -1895,7 +1895,7 @@ PP_Var PluginInstance::ResolveRelativeToDocument( WebElement plugin_element = container()->element(); GURL document_url = plugin_element.document().baseURL(); - return ::ppapi::URLUtilImpl::GenerateURLReturn( + return ::ppapi::PPB_URLUtil_Shared::GenerateURLReturn( module()->pp_module(), document_url.Resolve(relative_string->value()), components); @@ -1933,15 +1933,16 @@ PP_Bool PluginInstance::DocumentCanAccessDocument(PP_Instance instance, PP_Var PluginInstance::GetDocumentURL(PP_Instance instance, PP_URLComponents_Dev* components) { WebKit::WebDocument document = container()->element().document(); - return ::ppapi::URLUtilImpl::GenerateURLReturn(module()->pp_module(), - document.url(), components); + return ::ppapi::PPB_URLUtil_Shared::GenerateURLReturn( + module()->pp_module(), document.url(), components); } PP_Var PluginInstance::GetPluginInstanceURL( PP_Instance instance, PP_URLComponents_Dev* components) { - return ::ppapi::URLUtilImpl::GenerateURLReturn(module()->pp_module(), - plugin_url_, components); + return ::ppapi::PPB_URLUtil_Shared::GenerateURLReturn(module()->pp_module(), + plugin_url_, + components); } void PluginInstance::DoSetCursor(WebCursorInfo* cursor) { diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.h b/webkit/plugins/ppapi/ppapi_plugin_instance.h index a2d429b..83dcf43 100644 --- a/webkit/plugins/ppapi/ppapi_plugin_instance.h +++ b/webkit/plugins/ppapi/ppapi_plugin_instance.h @@ -26,7 +26,7 @@ #include "ppapi/c/ppp_graphics_3d.h" #include "ppapi/c/ppp_instance.h" #include "ppapi/shared_impl/function_group_base.h" -#include "ppapi/shared_impl/instance_impl.h" +#include "ppapi/shared_impl/ppb_instance_shared.h" #include "ppapi/shared_impl/ppp_instance_combined.h" #include "ppapi/thunk/ppb_instance_api.h" #include "third_party/skia/include/core/SkBitmap.h" @@ -86,7 +86,7 @@ class WEBKIT_PLUGINS_EXPORT PluginInstance : public base::RefCounted<PluginInstance>, public ::ppapi::FunctionGroupBase, NON_EXPORTED_BASE(public ::ppapi::thunk::PPB_Instance_FunctionAPI), - public ::ppapi::InstanceImpl { + public ::ppapi::PPB_Instance_Shared { public: // Create and return a PluginInstance object which supports the // PPP_Instance_1_0 interface. diff --git a/webkit/plugins/ppapi/ppb_audio_impl.h b/webkit/plugins/ppapi/ppb_audio_impl.h index 47c2e78..d131090 100644 --- a/webkit/plugins/ppapi/ppb_audio_impl.h +++ b/webkit/plugins/ppapi/ppb_audio_impl.h @@ -13,10 +13,10 @@ #include "ppapi/c/ppb_audio.h" #include "ppapi/c/ppb_audio_config.h" #include "ppapi/c/trusted/ppb_audio_trusted.h" -#include "ppapi/shared_impl/audio_config_impl.h" -#include "ppapi/shared_impl/audio_impl.h" -#include "ppapi/shared_impl/scoped_pp_resource.h" +#include "ppapi/shared_impl/ppb_audio_config_shared.h" +#include "ppapi/shared_impl/ppb_audio_shared.h" #include "ppapi/shared_impl/resource.h" +#include "ppapi/shared_impl/scoped_pp_resource.h" #include "webkit/plugins/ppapi/audio_helper.h" #include "webkit/plugins/ppapi/plugin_delegate.h" #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" @@ -25,9 +25,9 @@ namespace webkit { namespace ppapi { // Some of the backend functionality of this class is implemented by the -// AudioImpl so it can be shared with the proxy. +// PPB_Audio_Shared so it can be shared with the proxy. class PPB_Audio_Impl : public ::ppapi::Resource, - public ::ppapi::AudioImpl, + public ::ppapi::PPB_Audio_Shared, public AudioHelper { public: // Trusted initialization. You must call Init after this. diff --git a/webkit/plugins/ppapi/ppb_audio_input_impl.h b/webkit/plugins/ppapi/ppb_audio_input_impl.h index 4435eb6..f18a7a0 100644 --- a/webkit/plugins/ppapi/ppb_audio_input_impl.h +++ b/webkit/plugins/ppapi/ppb_audio_input_impl.h @@ -12,8 +12,8 @@ #include "ppapi/c/dev/ppb_audio_input_dev.h" #include "ppapi/c/pp_completion_callback.h" #include "ppapi/c/trusted/ppb_audio_input_trusted_dev.h" -#include "ppapi/shared_impl/audio_config_impl.h" -#include "ppapi/shared_impl/audio_input_impl.h" +#include "ppapi/shared_impl/ppb_audio_config_shared.h" +#include "ppapi/shared_impl/ppb_audio_input_shared.h" #include "ppapi/shared_impl/resource.h" #include "ppapi/shared_impl/scoped_pp_resource.h" #include "webkit/plugins/ppapi/audio_helper.h" @@ -26,7 +26,7 @@ namespace ppapi { // Some of the backend functionality of this class is implemented by the // AudioInputImpl so it can be shared with the proxy. class PPB_AudioInput_Impl : public ::ppapi::Resource, - public ::ppapi::AudioInputImpl, + public ::ppapi::PPB_AudioInput_Shared, public AudioHelper { public: // Trusted initialization. You must call Init after this. diff --git a/webkit/plugins/ppapi/ppb_file_ref_impl.cc b/webkit/plugins/ppapi/ppb_file_ref_impl.cc index 3b39ce6..bc0de22 100644 --- a/webkit/plugins/ppapi/ppb_file_ref_impl.cc +++ b/webkit/plugins/ppapi/ppb_file_ref_impl.cc @@ -80,14 +80,14 @@ std::string GetNameForVirtualFilePath(const std::string& path) { PPB_FileRef_Impl::PPB_FileRef_Impl(const PPB_FileRef_CreateInfo& info, PPB_FileSystem_Impl* file_system) - : FileRefImpl(FileRefImpl::InitAsImpl(), info), + : PPB_FileRef_Shared(PPB_FileRef_Shared::InitAsImpl(), info), file_system_(file_system), external_file_system_path_() { } PPB_FileRef_Impl::PPB_FileRef_Impl(const PPB_FileRef_CreateInfo& info, const FilePath& external_file_path) - : FileRefImpl(FileRefImpl::InitAsImpl(), info), + : PPB_FileRef_Shared(PPB_FileRef_Shared::InitAsImpl(), info), file_system_(), external_file_system_path_(external_file_path) { } diff --git a/webkit/plugins/ppapi/ppb_file_ref_impl.h b/webkit/plugins/ppapi/ppb_file_ref_impl.h index 39bc80b..c9b1dbf 100644 --- a/webkit/plugins/ppapi/ppb_file_ref_impl.h +++ b/webkit/plugins/ppapi/ppb_file_ref_impl.h @@ -10,7 +10,7 @@ #include "base/file_path.h" #include "googleurl/src/gurl.h" #include "ppapi/c/ppb_file_ref.h" -#include "ppapi/shared_impl/file_ref_impl.h" +#include "ppapi/shared_impl/ppb_file_ref_shared.h" #include "ppapi/shared_impl/var.h" namespace webkit { @@ -20,7 +20,7 @@ using ::ppapi::StringVar; class PPB_FileSystem_Impl; -class PPB_FileRef_Impl : public ::ppapi::FileRefImpl { +class PPB_FileRef_Impl : public ::ppapi::PPB_FileRef_Shared { public: PPB_FileRef_Impl(const ::ppapi::PPB_FileRef_CreateInfo& info, PPB_FileSystem_Impl* file_system); @@ -36,7 +36,7 @@ class PPB_FileRef_Impl : public ::ppapi::FileRefImpl { static PPB_FileRef_Impl* CreateExternal(PP_Instance instance, const FilePath& external_file_path); - // PPB_FileRef_API implementation (not provided by FileRefImpl). + // PPB_FileRef_API implementation (not provided by PPB_FileRef_Shared). virtual PP_Resource GetParent() OVERRIDE; virtual int32_t MakeDirectory(PP_Bool make_ancestors, PP_CompletionCallback callback) OVERRIDE; diff --git a/webkit/plugins/ppapi/ppb_font_impl.cc b/webkit/plugins/ppapi/ppb_font_impl.cc index a714e03..cac50b5 100644 --- a/webkit/plugins/ppapi/ppb_font_impl.cc +++ b/webkit/plugins/ppapi/ppb_font_impl.cc @@ -5,8 +5,8 @@ #include "webkit/plugins/ppapi/ppb_font_impl.h" #include "ppapi/c/dev/ppb_font_dev.h" -#include "ppapi/shared_impl/font_impl.h" #include "ppapi/shared_impl/ppapi_preferences.h" +#include "ppapi/shared_impl/ppb_font_shared.h" #include "ppapi/shared_impl/var.h" #include "ppapi/thunk/enter.h" #include "ppapi/thunk/thunk.h" @@ -64,7 +64,7 @@ PPB_Font_Impl::~PPB_Font_Impl() { // static PP_Resource PPB_Font_Impl::Create(PP_Instance instance, const PP_FontDescription_Dev& description) { - if (!::ppapi::FontImpl::IsPPFontDescriptionValid(description)) + if (!::ppapi::PPB_Font_Shared::IsPPFontDescriptionValid(description)) return 0; return (new PPB_Font_Impl(instance, description))->GetReference(); } diff --git a/webkit/plugins/ppapi/ppb_graphics_3d_impl.h b/webkit/plugins/ppapi/ppb_graphics_3d_impl.h index 250911b..728f58a 100644 --- a/webkit/plugins/ppapi/ppb_graphics_3d_impl.h +++ b/webkit/plugins/ppapi/ppb_graphics_3d_impl.h @@ -6,7 +6,7 @@ #define WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_3D_IMPL_H_ #include "base/memory/weak_ptr.h" -#include "ppapi/shared_impl/graphics_3d_impl.h" +#include "ppapi/shared_impl/ppb_graphics_3d_shared.h" #include "ppapi/shared_impl/resource.h" #include "webkit/plugins/ppapi/plugin_delegate.h" @@ -14,7 +14,7 @@ namespace webkit { namespace ppapi { class PPB_Graphics3D_Impl : public ::ppapi::Resource, - public ::ppapi::Graphics3DImpl { + public ::ppapi::PPB_Graphics3D_Shared { public: virtual ~PPB_Graphics3D_Impl(); @@ -62,7 +62,7 @@ class PPB_Graphics3D_Impl : public ::ppapi::Resource, } protected: - // ppapi::Graphics3DImpl overrides. + // ppapi::PPB_Graphics3D_Shared overrides. virtual gpu::CommandBuffer* GetCommandBuffer() OVERRIDE; virtual int32 DoSwapBuffers() OVERRIDE; diff --git a/webkit/plugins/ppapi/ppb_image_data_impl.h b/webkit/plugins/ppapi/ppb_image_data_impl.h index 1c6b7ff..64685d0 100644 --- a/webkit/plugins/ppapi/ppb_image_data_impl.h +++ b/webkit/plugins/ppapi/ppb_image_data_impl.h @@ -8,7 +8,7 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" #include "ppapi/c/ppb_image_data.h" -#include "ppapi/shared_impl/image_data_impl.h" +#include "ppapi/shared_impl/ppb_image_data_shared.h" #include "ppapi/shared_impl/resource.h" #include "ppapi/thunk/ppb_image_data_api.h" #include "webkit/plugins/ppapi/plugin_delegate.h" @@ -24,7 +24,7 @@ namespace webkit { namespace ppapi { class PPB_ImageData_Impl : public ::ppapi::Resource, - public ::ppapi::ImageDataImpl, + public ::ppapi::PPB_ImageData_Shared, public ::ppapi::thunk::PPB_ImageData_API { public: // If you call this constructor, you must also call Init before use. Normally diff --git a/webkit/plugins/ppapi/ppb_opengles_impl.cc b/webkit/plugins/ppapi/ppb_opengles_impl.cc deleted file mode 100644 index 1f95df5..0000000 --- a/webkit/plugins/ppapi/ppb_opengles_impl.cc +++ /dev/null @@ -1,18 +0,0 @@ -// 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 "webkit/plugins/ppapi/ppb_opengles_impl.h" - -#include "ppapi/shared_impl/opengles2_impl.h" - -namespace webkit { -namespace ppapi { - -const PPB_OpenGLES2* PPB_OpenGLES_Impl::GetInterface() { - return ::ppapi::OpenGLES2Impl::GetInterface(); -} - -} // namespace ppapi -} // namespace webkit - diff --git a/webkit/plugins/ppapi/ppb_opengles_impl.h b/webkit/plugins/ppapi/ppb_opengles_impl.h deleted file mode 100644 index e4a69d2..0000000 --- a/webkit/plugins/ppapi/ppb_opengles_impl.h +++ /dev/null @@ -1,22 +0,0 @@ -// 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 WEBKIT_PLUGINS_PPAPI_PPB_OPENGLES_IMPL_H_ -#define WEBKIT_PLUGINS_PPAPI_PPB_OPENGLES_IMPL_H_ - -struct PPB_OpenGLES2; - -namespace webkit { -namespace ppapi { - -class PPB_OpenGLES_Impl { - public: - static const PPB_OpenGLES2* GetInterface(); -}; - -} // namespace ppapi -} // namespace webkit - -#endif // WEBKIT_PLUGINS_PPAPI_PPB_OPENGLES_IMPL_H_ - diff --git a/webkit/plugins/ppapi/ppb_url_loader_impl.h b/webkit/plugins/ppapi/ppb_url_loader_impl.h index 61f4cde..326568e 100644 --- a/webkit/plugins/ppapi/ppb_url_loader_impl.h +++ b/webkit/plugins/ppapi/ppb_url_loader_impl.h @@ -11,8 +11,8 @@ #include "base/memory/scoped_ptr.h" #include "ppapi/c/pp_completion_callback.h" #include "ppapi/c/trusted/ppb_url_loader_trusted.h" +#include "ppapi/shared_impl/ppb_url_request_info_shared.h" #include "ppapi/shared_impl/resource.h" -#include "ppapi/shared_impl/url_request_info_impl.h" #include "ppapi/thunk/ppb_url_loader_api.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLLoaderClient.h" #include "webkit/plugins/ppapi/callbacks.h" diff --git a/webkit/plugins/ppapi/ppb_url_request_info_impl.cc b/webkit/plugins/ppapi/ppb_url_request_info_impl.cc index eceedd7..dcea987 100644 --- a/webkit/plugins/ppapi/ppb_url_request_info_impl.cc +++ b/webkit/plugins/ppapi/ppb_url_request_info_impl.cc @@ -49,7 +49,7 @@ const int32_t kDefaultPrefetchBufferLowerThreshold = 50 * 1000 * 1000; PPB_URLRequestInfo_Impl::PPB_URLRequestInfo_Impl( PP_Instance instance, const PPB_URLRequestInfo_Data& data) - : URLRequestInfoImpl(instance, data) { + : PPB_URLRequestInfo_Shared(instance, data) { } PPB_URLRequestInfo_Impl::~PPB_URLRequestInfo_Impl() { diff --git a/webkit/plugins/ppapi/ppb_url_request_info_impl.h b/webkit/plugins/ppapi/ppb_url_request_info_impl.h index d9841f0..d2403b6 100644 --- a/webkit/plugins/ppapi/ppb_url_request_info_impl.h +++ b/webkit/plugins/ppapi/ppb_url_request_info_impl.h @@ -7,7 +7,7 @@ #include "base/memory/ref_counted.h" #include "ppapi/thunk/ppb_url_request_info_api.h" -#include "ppapi/shared_impl/url_request_info_impl.h" +#include "ppapi/shared_impl/ppb_url_request_info_shared.h" #include "webkit/plugins/webkit_plugins_export.h" namespace WebKit { @@ -20,7 +20,7 @@ namespace webkit { namespace ppapi { class WEBKIT_PLUGINS_EXPORT PPB_URLRequestInfo_Impl : - public ::ppapi::URLRequestInfoImpl { + public ::ppapi::PPB_URLRequestInfo_Shared { public: explicit PPB_URLRequestInfo_Impl( PP_Instance instance, diff --git a/webkit/plugins/ppapi/ppb_video_decoder_impl.cc b/webkit/plugins/ppapi/ppb_video_decoder_impl.cc index f108ecf..a226a77 100644 --- a/webkit/plugins/ppapi/ppb_video_decoder_impl.cc +++ b/webkit/plugins/ppapi/ppb_video_decoder_impl.cc @@ -190,7 +190,7 @@ void PPB_VideoDecoder_Impl::Destroy() { FlushCommandBuffer(); platform_video_decoder_->Destroy(); - ::ppapi::VideoDecoderImpl::Destroy(); + ::ppapi::PPB_VideoDecoder_Shared::Destroy(); platform_video_decoder_ = NULL; ppp_videodecoder_ = NULL; } diff --git a/webkit/plugins/ppapi/ppb_video_decoder_impl.h b/webkit/plugins/ppapi/ppb_video_decoder_impl.h index a989ff8..47a9af4 100644 --- a/webkit/plugins/ppapi/ppb_video_decoder_impl.h +++ b/webkit/plugins/ppapi/ppb_video_decoder_impl.h @@ -13,8 +13,8 @@ #include "base/memory/scoped_ptr.h" #include "ppapi/c/dev/pp_video_dev.h" #include "ppapi/c/pp_var.h" +#include "ppapi/shared_impl/ppb_video_decoder_shared.h" #include "ppapi/shared_impl/resource.h" -#include "ppapi/shared_impl/video_decoder_impl.h" #include "ppapi/thunk/ppb_video_decoder_api.h" #include "webkit/plugins/ppapi/plugin_delegate.h" @@ -33,7 +33,7 @@ namespace webkit { namespace ppapi { class PPB_VideoDecoder_Impl : public ::ppapi::Resource, - public ::ppapi::VideoDecoderImpl, + public ::ppapi::PPB_VideoDecoder_Shared, public media::VideoDecodeAccelerator::Client { public: virtual ~PPB_VideoDecoder_Impl(); diff --git a/webkit/plugins/ppapi/resource_creation_impl.cc b/webkit/plugins/ppapi/resource_creation_impl.cc index d2b57f3..4b2e364 100644 --- a/webkit/plugins/ppapi/resource_creation_impl.cc +++ b/webkit/plugins/ppapi/resource_creation_impl.cc @@ -5,8 +5,8 @@ #include "webkit/plugins/ppapi/resource_creation_impl.h" #include "ppapi/c/pp_size.h" -#include "ppapi/shared_impl/audio_config_impl.h" -#include "ppapi/shared_impl/input_event_impl.h" +#include "ppapi/shared_impl/ppb_audio_config_shared.h" +#include "ppapi/shared_impl/ppb_input_event_shared.h" #include "ppapi/shared_impl/var.h" #include "webkit/plugins/ppapi/common.h" #include "webkit/plugins/ppapi/ppb_audio_impl.h" @@ -36,7 +36,7 @@ #include "webkit/plugins/ppapi/ppb_websocket_impl.h" using ppapi::InputEventData; -using ppapi::InputEventImpl; +using ppapi::PPB_InputEvent_Shared; using ppapi::StringVar; namespace webkit { @@ -66,8 +66,8 @@ PP_Resource ResourceCreationImpl::CreateAudioConfig( PP_Instance instance, PP_AudioSampleRate sample_rate, uint32_t sample_frame_count) { - return ::ppapi::AudioConfigImpl::CreateAsImpl(instance, sample_rate, - sample_frame_count); + return ::ppapi::PPB_AudioConfig_Shared::CreateAsImpl(instance, sample_rate, + sample_frame_count); } PP_Resource ResourceCreationImpl::CreateAudioTrusted( @@ -196,8 +196,8 @@ PP_Resource ResourceCreationImpl::CreateKeyboardInputEvent( data.character_text = string_var->value(); } - return (new InputEventImpl(InputEventImpl::InitAsImpl(), - instance, data))->GetReference(); + return (new PPB_InputEvent_Shared(PPB_InputEvent_Shared::InitAsImpl(), + instance, data))->GetReference(); } PP_Resource ResourceCreationImpl::CreateMouseInputEvent( @@ -225,8 +225,8 @@ PP_Resource ResourceCreationImpl::CreateMouseInputEvent( data.mouse_click_count = click_count; data.mouse_movement = *mouse_movement; - return (new InputEventImpl(InputEventImpl::InitAsImpl(), - instance, data))->GetReference(); + return (new PPB_InputEvent_Shared(PPB_InputEvent_Shared::InitAsImpl(), + instance, data))->GetReference(); } PP_Resource ResourceCreationImpl::CreateScrollbar(PP_Instance instance, @@ -299,8 +299,8 @@ PP_Resource ResourceCreationImpl::CreateWheelInputEvent( data.wheel_ticks = *wheel_ticks; data.wheel_scroll_by_page = PP_ToBool(scroll_by_page); - return (new InputEventImpl(InputEventImpl::InitAsImpl(), - instance, data))->GetReference(); + return (new PPB_InputEvent_Shared(PPB_InputEvent_Shared::InitAsImpl(), + instance, data))->GetReference(); } } // namespace ppapi diff --git a/webkit/plugins/ppapi/url_request_info_unittest.cc b/webkit/plugins/ppapi/url_request_info_unittest.cc index bdfe1c7..c7f1720 100644 --- a/webkit/plugins/ppapi/url_request_info_unittest.cc +++ b/webkit/plugins/ppapi/url_request_info_unittest.cc @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ppapi/shared_impl/url_request_info_impl.h" #include "ppapi/thunk/thunk.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrameClient.h" |