diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-20 23:09:28 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-20 23:09:28 +0000 |
commit | ac4b54de7f49f4f0910b952888eb44fc55737195 (patch) | |
tree | 00fc8b7d9bb51ca71ee34d3befb20be85acc2a3c /ppapi/proxy | |
parent | d365a681dce7dca73ecbd682529a98b5505e9cdb (diff) | |
download | chromium_src-ac4b54de7f49f4f0910b952888eb44fc55737195.zip chromium_src-ac4b54de7f49f4f0910b952888eb44fc55737195.tar.gz chromium_src-ac4b54de7f49f4f0910b952888eb44fc55737195.tar.bz2 |
Rename InterfaceID to ApiID and move the file.
This was originally in the proxy and had a 1:1 correspondence with an
interface. Then we reused this for other stuff and then merged some interfaces
into larger APIs (ppapi/thunk/*_api.h) so the name was no longer accurate.
It was wrong to be in the proxy directory since directories at a "lower level"
than the proxy (ppapi/shared_impl and webkit/plugins/ppapi) depended on it.
This renames to ApiID (I avoided APIID since it looks like a define) which is
the proper description of the class, and moved it to shared_impl. This fixes
the deps since there are no longer any bad dependencies on the proxy directory.
TEST=it compiles
BUG=none
Review URL: http://codereview.chromium.org/8333004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106619 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy')
68 files changed, 283 insertions, 354 deletions
diff --git a/ppapi/proxy/dispatcher.cc b/ppapi/proxy/dispatcher.cc index 8381c6a..1d8614d 100644 --- a/ppapi/proxy/dispatcher.cc +++ b/ppapi/proxy/dispatcher.cc @@ -28,7 +28,7 @@ Dispatcher::Dispatcher(base::ProcessHandle remote_process_handle, Dispatcher::~Dispatcher() { } -InterfaceProxy* Dispatcher::GetInterfaceProxy(InterfaceID id) { +InterfaceProxy* Dispatcher::GetInterfaceProxy(ApiID id) { InterfaceProxy* proxy = proxies_[id].get(); if (!proxy) { // Handle the first time for a given API by creating the proxy for it. @@ -66,13 +66,13 @@ bool Dispatcher::OnMessageReceived(const IPC::Message& msg) { return handled; } - if (msg.routing_id() <= 0 || msg.routing_id() >= INTERFACE_ID_COUNT) { + if (msg.routing_id() <= 0 || msg.routing_id() >= API_ID_COUNT) { OnInvalidMessageReceived(); return true; } InterfaceProxy* proxy = GetInterfaceProxy( - static_cast<InterfaceID>(msg.routing_id())); + static_cast<ApiID>(msg.routing_id())); if (!proxy) { NOTREACHED(); return true; diff --git a/ppapi/proxy/dispatcher.h b/ppapi/proxy/dispatcher.h index a48cff7..9a4395e 100644 --- a/ppapi/proxy/dispatcher.h +++ b/ppapi/proxy/dispatcher.h @@ -16,10 +16,10 @@ #include "ppapi/c/pp_module.h" #include "ppapi/proxy/callback_tracker.h" #include "ppapi/proxy/proxy_channel.h" -#include "ppapi/proxy/interface_id.h" #include "ppapi/proxy/interface_list.h" #include "ppapi/proxy/interface_proxy.h" #include "ppapi/proxy/plugin_var_tracker.h" +#include "ppapi/shared_impl/api_id.h" namespace ppapi { @@ -61,7 +61,7 @@ class PPAPI_PROXY_EXPORT Dispatcher : public ProxyChannel { // Returns a non-owning pointer to the interface proxy for the given ID, or // NULL if the ID isn't found. This will create the proxy if it hasn't been // created so far. - InterfaceProxy* GetInterfaceProxy(InterfaceID id); + InterfaceProxy* GetInterfaceProxy(ApiID id); // Returns the pointer to the IO thread for processing IPC messages. // TODO(brettw) remove this. It's a hack to support the Flash @@ -110,7 +110,7 @@ class PPAPI_PROXY_EXPORT Dispatcher : public ProxyChannel { friend class PluginDispatcherTest; // Lists all lazily-created interface proxies. - scoped_ptr<InterfaceProxy> proxies_[INTERFACE_ID_COUNT]; + scoped_ptr<InterfaceProxy> proxies_[API_ID_COUNT]; bool disallow_trusted_interfaces_; diff --git a/ppapi/proxy/interface_id.h b/ppapi/proxy/interface_id.h deleted file mode 100644 index 4b5c29e..0000000 --- a/ppapi/proxy/interface_id.h +++ /dev/null @@ -1,69 +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 PPAPI_PROXY_INTERFACE_ID_H_ -#define PPAPI_PROXY_INTERFACE_ID_H_ - -namespace ppapi { -namespace proxy { - -// These numbers must be all small integers. They are used in a lookup table -// to route messages to the appropriate message handler. -enum InterfaceID { - // Zero is reserved for control messages. - INTERFACE_ID_NONE = 0, - INTERFACE_ID_PPB_AUDIO = 1, - INTERFACE_ID_PPB_AUDIO_CONFIG, - INTERFACE_ID_PPB_BROKER, - INTERFACE_ID_PPB_BUFFER, - INTERFACE_ID_PPB_CONTEXT_3D, - INTERFACE_ID_PPB_CORE, - INTERFACE_ID_PPB_CURSORCONTROL, - INTERFACE_ID_PPB_FILE_CHOOSER, - INTERFACE_ID_PPB_FILE_REF, - INTERFACE_ID_PPB_FILE_SYSTEM, - INTERFACE_ID_PPB_FLASH, - INTERFACE_ID_PPB_FLASH_CLIPBOARD, - INTERFACE_ID_PPB_FLASH_FILE_FILEREF, - INTERFACE_ID_PPB_FLASH_FILE_MODULELOCAL, - INTERFACE_ID_PPB_FLASH_MENU, - INTERFACE_ID_PPB_FLASH_NETCONNECTOR, - INTERFACE_ID_PPB_FLASH_TCPSOCKET, - INTERFACE_ID_PPB_FLASH_UDPSOCKET, - INTERFACE_ID_PPB_FONT, - INTERFACE_ID_PPB_GRAPHICS_2D, - INTERFACE_ID_PPB_GRAPHICS_3D, - INTERFACE_ID_PPB_INSTANCE, - INTERFACE_ID_PPB_INSTANCE_PRIVATE, - INTERFACE_ID_PPB_OPENGLES2, - INTERFACE_ID_PPB_PDF, - INTERFACE_ID_PPB_SURFACE_3D, - INTERFACE_ID_PPB_TESTING, - INTERFACE_ID_PPB_TEXT_INPUT, - INTERFACE_ID_PPB_URL_LOADER, - INTERFACE_ID_PPB_URL_RESPONSE_INFO, - INTERFACE_ID_PPB_VAR_DEPRECATED, - INTERFACE_ID_PPB_VIDEO_CAPTURE_DEV, - INTERFACE_ID_PPB_VIDEO_DECODER_DEV, - - INTERFACE_ID_PPP_CLASS, - INTERFACE_ID_PPP_GRAPHICS_3D, - INTERFACE_ID_PPP_INPUT_EVENT, - INTERFACE_ID_PPP_INSTANCE, - INTERFACE_ID_PPP_INSTANCE_PRIVATE, - INTERFACE_ID_PPP_MESSAGING, - INTERFACE_ID_PPP_MOUSE_LOCK, - INTERFACE_ID_PPP_VIDEO_CAPTURE_DEV, - INTERFACE_ID_PPP_VIDEO_DECODER_DEV, - - INTERFACE_ID_RESOURCE_CREATION, - - // Must be last to indicate the number of interface IDs. - INTERFACE_ID_COUNT -}; - -} // namespace proxy -} // namespace ppapi - -#endif // PPAPI_PROXY_INTERFACE_ID_H_ diff --git a/ppapi/proxy/interface_list.cc b/ppapi/proxy/interface_list.cc index 351790c..2dcc526 100644 --- a/ppapi/proxy/interface_list.cc +++ b/ppapi/proxy/interface_list.cc @@ -99,9 +99,9 @@ // Helper to get the proxy name PPB_Foo_Proxy given the API name PPB_Foo. #define PROXY_CLASS_NAME(api_name) api_name##_Proxy -// Helper to get the interface ID PPB_Foo_Proxy::kInterfaceID given the API +// Helper to get the interface ID PPB_Foo_Proxy::kApiID given the API // name PPB_Foo. -#define PROXY_INTERFACE_ID(api_name) PROXY_CLASS_NAME(api_name)::kInterfaceID +#define PROXY_API_ID(api_name) PROXY_CLASS_NAME(api_name)::kApiID // Helper to get the name of the factory function CreatePPB_Foo_Proxy given // the API name PPB_Foo. @@ -118,13 +118,13 @@ namespace { // The interface list has interfaces with no ID listed as "NoAPIName" which // means there's no corresponding _Proxy object. Our macros expand this to -// NoAPIName_Proxy, and then they look for kInterfaceID inside it. +// NoAPIName_Proxy, and then they look for kApiID inside it. // // This dummy class provides the correct definition for that interface ID, // which is "NONE". class NoAPIName_Proxy { public: - static const InterfaceID kInterfaceID = INTERFACE_ID_NONE; + static const ApiID kApiID = API_ID_NONE; }; // Define factory functions for each interface type. These are of the form: @@ -146,12 +146,12 @@ InterfaceList::InterfaceList() { // Register the API factories for each of the API types. This calls AddProxy // for each InterfaceProxy type we support. #define PROXIED_API(api_name) \ - AddProxy(PROXY_INTERFACE_ID(api_name), &PROXY_FACTORY_NAME(api_name)); + AddProxy(PROXY_API_ID(api_name), &PROXY_FACTORY_NAME(api_name)); // Register each proxied interface by calling AddPPB for each supported // interface. #define PROXIED_IFACE(api_name, iface_str, iface_struct) \ - AddPPB(iface_str, PROXY_INTERFACE_ID(api_name), \ + AddPPB(iface_str, PROXY_API_ID(api_name), \ INTERFACE_THUNK_NAME(iface_struct)()); #include "ppapi/thunk/interfaces_ppb_public_stable.h" @@ -165,13 +165,13 @@ InterfaceList::InterfaceList() { // that they support, so aren't covered by the macros above, but have proxies // for message routing. Others have different implementations between the // proxy and the impl and there's no obvious message routing. - AddProxy(INTERFACE_ID_RESOURCE_CREATION, &ResourceCreationProxy::Create); - AddProxy(INTERFACE_ID_PPP_CLASS, &PPP_Class_Proxy::Create); - AddPPB(PPB_CORE_INTERFACE, INTERFACE_ID_PPB_CORE, + AddProxy(API_ID_RESOURCE_CREATION, &ResourceCreationProxy::Create); + AddProxy(API_ID_PPP_CLASS, &PPP_Class_Proxy::Create); + AddPPB(PPB_CORE_INTERFACE, API_ID_PPB_CORE, PPB_Core_Proxy::GetPPB_Core_Interface()); - AddPPB(PPB_OPENGLES2_INTERFACE, INTERFACE_ID_NONE, + AddPPB(PPB_OPENGLES2_INTERFACE, API_ID_NONE, OpenGLES2Impl::GetInterface()); - AddPPB(PPB_VAR_INTERFACE, INTERFACE_ID_NONE, + AddPPB(PPB_VAR_INTERFACE, API_ID_NONE, GetPPB_Var_Interface()); // PPB (browser) interfaces. @@ -212,26 +212,26 @@ InterfaceList* InterfaceList::GetInstance() { return Singleton<InterfaceList>::get(); } -InterfaceID InterfaceList::GetIDForPPBInterface(const std::string& name) const { +ApiID InterfaceList::GetIDForPPBInterface(const std::string& name) const { NameToInterfaceInfoMap::const_iterator found = name_to_browser_info_.find(name); if (found == name_to_browser_info_.end()) - return INTERFACE_ID_NONE; + return API_ID_NONE; return found->second.id; } -InterfaceID InterfaceList::GetIDForPPPInterface(const std::string& name) const { +ApiID InterfaceList::GetIDForPPPInterface(const std::string& name) const { NameToInterfaceInfoMap::const_iterator found = name_to_plugin_info_.find(name); if (found == name_to_plugin_info_.end()) - return INTERFACE_ID_NONE; + return API_ID_NONE; return found->second.id; } -InterfaceProxy::Factory InterfaceList::GetFactoryForID(InterfaceID id) const { +InterfaceProxy::Factory InterfaceList::GetFactoryForID(ApiID id) const { int index = static_cast<int>(id); - COMPILE_ASSERT(INTERFACE_ID_NONE == 0, none_must_be_zero); - if (id <= 0 || id >= INTERFACE_ID_COUNT) + COMPILE_ASSERT(API_ID_NONE == 0, none_must_be_zero); + if (id <= 0 || id >= API_ID_COUNT) return NULL; return id_to_factory_[index]; } @@ -252,12 +252,12 @@ const void* InterfaceList::GetInterfaceForPPP(const std::string& name) const { return found->second.iface; } -void InterfaceList::AddProxy(InterfaceID id, +void InterfaceList::AddProxy(ApiID id, InterfaceProxy::Factory factory) { // For interfaces with no corresponding _Proxy objects, the macros will - // generate calls to this function with INTERFACE_ID_NONE. This means we + // generate calls to this function with API_ID_NONE. This means we // should just skip adding a factory for these functions. - if (id == INTERFACE_ID_NONE) + if (id == API_ID_NONE) return; // The factory should be an exact dupe of the one we already have if it @@ -269,14 +269,14 @@ void InterfaceList::AddProxy(InterfaceID id, } void InterfaceList::AddPPB(const char* name, - InterfaceID id, + ApiID id, const void* iface) { DCHECK(name_to_browser_info_.find(name) == name_to_browser_info_.end()); name_to_browser_info_[name] = InterfaceInfo(id, iface); } void InterfaceList::AddPPP(const char* name, - InterfaceID id, + ApiID id, const void* iface) { DCHECK(name_to_plugin_info_.find(name) == name_to_plugin_info_.end()); name_to_plugin_info_[name] = InterfaceInfo(id, iface); diff --git a/ppapi/proxy/interface_list.h b/ppapi/proxy/interface_list.h index 0290af9..f29198f 100644 --- a/ppapi/proxy/interface_list.h +++ b/ppapi/proxy/interface_list.h @@ -21,14 +21,14 @@ class InterfaceList { static InterfaceList* GetInstance(); - // Looks up the ID for the given interface name. Returns INTERFACE_ID_NONE if + // Looks up the ID for the given interface name. Returns API_ID_NONE if // the interface string is not found. - InterfaceID GetIDForPPBInterface(const std::string& name) const; - InterfaceID GetIDForPPPInterface(const std::string& name) const; + ApiID GetIDForPPBInterface(const std::string& name) const; + ApiID GetIDForPPPInterface(const std::string& name) const; // Looks up the factory function for the given ID. Returns NULL if not // supported. - InterfaceProxy::Factory GetFactoryForID(InterfaceID id) const; + InterfaceProxy::Factory GetFactoryForID(ApiID id) const; // Returns the interface pointer for the given browser or plugin interface, // or NULL if it's not supported. @@ -38,24 +38,24 @@ class InterfaceList { private: struct InterfaceInfo { InterfaceInfo() - : id(INTERFACE_ID_NONE), + : id(API_ID_NONE), iface(NULL) { } - InterfaceInfo(InterfaceID in_id, const void* in_interface) + InterfaceInfo(ApiID in_id, const void* in_interface) : id(in_id), iface(in_interface) { } - InterfaceID id; + ApiID id; const void* iface; }; typedef std::map<std::string, InterfaceInfo> NameToInterfaceInfoMap; - void AddProxy(InterfaceID id, InterfaceProxy::Factory factory); + void AddProxy(ApiID id, InterfaceProxy::Factory factory); - void AddPPB(const char* name, InterfaceID id, const void* iface); - void AddPPP(const char* name, InterfaceID id, const void* iface); + void AddPPB(const char* name, ApiID id, const void* iface); + void AddPPP(const char* name, ApiID id, const void* iface); // Old-style add functions. These should be removed when the rest of the // proxies are converted over to using the new system. @@ -65,7 +65,7 @@ class InterfaceList { NameToInterfaceInfoMap name_to_browser_info_; NameToInterfaceInfoMap name_to_plugin_info_; - InterfaceProxy::Factory id_to_factory_[INTERFACE_ID_COUNT]; + InterfaceProxy::Factory id_to_factory_[API_ID_COUNT]; DISALLOW_COPY_AND_ASSIGN(InterfaceList); }; diff --git a/ppapi/proxy/interface_proxy.h b/ppapi/proxy/interface_proxy.h index 795944b..b9891b9 100644 --- a/ppapi/proxy/interface_proxy.h +++ b/ppapi/proxy/interface_proxy.h @@ -11,7 +11,7 @@ #include "ppapi/c/pp_completion_callback.h" #include "ppapi/c/pp_resource.h" #include "ppapi/c/pp_var.h" -#include "ppapi/proxy/interface_id.h" +#include "ppapi/shared_impl/api_id.h" #include "ppapi/shared_impl/function_group_base.h" namespace ppapi { @@ -38,7 +38,7 @@ class InterfaceProxy : public IPC::Channel::Listener, const void* interface_ptr; const char* name; - InterfaceID id; + ApiID id; bool is_trusted; diff --git a/ppapi/proxy/plugin_dispatcher.cc b/ppapi/proxy/plugin_dispatcher.cc index c036c01..dba5253 100644 --- a/ppapi/proxy/plugin_dispatcher.cc +++ b/ppapi/proxy/plugin_dispatcher.cc @@ -199,7 +199,7 @@ WebKitForwarding* PluginDispatcher::GetWebKitForwarding() { return plugin_delegate_->GetWebKitForwarding(); } -FunctionGroupBase* PluginDispatcher::GetFunctionAPI(InterfaceID id) { +FunctionGroupBase* PluginDispatcher::GetFunctionAPI(ApiID id) { return GetInterfaceProxy(id); } @@ -215,7 +215,7 @@ void PluginDispatcher::ForceFreeAllInstances() { if (i->second == this) { // Synthesize an "instance destroyed" message, this will notify the // plugin and also remove it from our list of tracked plugins. - PpapiMsg_PPPInstance_DidDestroy msg(INTERFACE_ID_PPP_INSTANCE, i->first); + PpapiMsg_PPPInstance_DidDestroy msg(API_ID_PPP_INSTANCE, i->first); OnMessageReceived(msg); } } diff --git a/ppapi/proxy/plugin_dispatcher.h b/ppapi/proxy/plugin_dispatcher.h index 028cf72..2775463 100644 --- a/ppapi/proxy/plugin_dispatcher.h +++ b/ppapi/proxy/plugin_dispatcher.h @@ -136,7 +136,7 @@ class PPAPI_PROXY_EXPORT PluginDispatcher : public Dispatcher { // it if necessary. // TODO(brettw) this is in progress. It should be merged with the target // proxies so there is one list to consult. - FunctionGroupBase* GetFunctionAPI(InterfaceID id); + FunctionGroupBase* GetFunctionAPI(ApiID id); uint32 plugin_dispatcher_id() const { return plugin_dispatcher_id_; } diff --git a/ppapi/proxy/plugin_dispatcher_unittest.cc b/ppapi/proxy/plugin_dispatcher_unittest.cc index 8a32026..a2999d0 100644 --- a/ppapi/proxy/plugin_dispatcher_unittest.cc +++ b/ppapi/proxy/plugin_dispatcher_unittest.cc @@ -52,7 +52,7 @@ class PluginDispatcherTest : public PluginProxyTest { public: PluginDispatcherTest() {} - bool HasTargetProxy(InterfaceID id) { + bool HasTargetProxy(ApiID id) { return !!plugin_dispatcher()->proxies_[id].get(); } }; @@ -71,12 +71,12 @@ TEST_F(PluginDispatcherTest, SupportsInterface) { TEST_F(PluginDispatcherTest, PPBCreation) { // Sending a PPB message out of the blue should create a target proxy for // that interface in the plugin. - EXPECT_FALSE(HasTargetProxy(INTERFACE_ID_PPB_AUDIO)); + EXPECT_FALSE(HasTargetProxy(API_ID_PPB_AUDIO)); PpapiMsg_PPBAudio_NotifyAudioStreamCreated audio_msg( - INTERFACE_ID_PPB_AUDIO, HostResource(), 0, + API_ID_PPB_AUDIO, HostResource(), 0, IPC::PlatformFileForTransit(), base::SharedMemoryHandle(), 0); plugin_dispatcher()->OnMessageReceived(audio_msg); - EXPECT_TRUE(HasTargetProxy(INTERFACE_ID_PPB_AUDIO)); + EXPECT_TRUE(HasTargetProxy(API_ID_PPB_AUDIO)); } } // namespace proxy diff --git a/ppapi/proxy/plugin_globals.cc b/ppapi/proxy/plugin_globals.cc index 9aa5278..6fad009 100644 --- a/ppapi/proxy/plugin_globals.cc +++ b/ppapi/proxy/plugin_globals.cc @@ -29,8 +29,7 @@ VarTracker* PluginGlobals::GetVarTracker() { return &plugin_var_tracker_; } -FunctionGroupBase* PluginGlobals::GetFunctionAPI(PP_Instance inst, - proxy::InterfaceID id) { +FunctionGroupBase* PluginGlobals::GetFunctionAPI(PP_Instance inst, ApiID id) { PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(inst); if (dispatcher) return dispatcher->GetFunctionAPI(id); diff --git a/ppapi/proxy/plugin_globals.h b/ppapi/proxy/plugin_globals.h index ee4fac4..9192c92 100644 --- a/ppapi/proxy/plugin_globals.h +++ b/ppapi/proxy/plugin_globals.h @@ -28,7 +28,7 @@ class PPAPI_PROXY_EXPORT PluginGlobals : public PpapiGlobals { virtual ResourceTracker* GetResourceTracker() OVERRIDE; virtual VarTracker* GetVarTracker() OVERRIDE; virtual FunctionGroupBase* GetFunctionAPI(PP_Instance inst, - proxy::InterfaceID id) OVERRIDE; + ApiID id) OVERRIDE; virtual PP_Module GetModuleForInstance(PP_Instance instance) OVERRIDE; // Getters for the plugin-specific versions. diff --git a/ppapi/proxy/plugin_resource_tracker.cc b/ppapi/proxy/plugin_resource_tracker.cc index e91b35f..3fee320 100644 --- a/ppapi/proxy/plugin_resource_tracker.cc +++ b/ppapi/proxy/plugin_resource_tracker.cc @@ -65,7 +65,7 @@ void PluginResourceTracker::RemoveResource(Resource* object) { // the instance was destroyed. In that case the browser-side resource has // already been freed correctly on the browser side. dispatcher->Send(new PpapiHostMsg_PPBCore_ReleaseResource( - INTERFACE_ID_PPB_CORE, object->host_resource())); + API_ID_PPB_CORE, object->host_resource())); } } } diff --git a/ppapi/proxy/plugin_var_tracker.cc b/ppapi/proxy/plugin_var_tracker.cc index ad8a844..8ea25b1 100644 --- a/ppapi/proxy/plugin_var_tracker.cc +++ b/ppapi/proxy/plugin_var_tracker.cc @@ -9,8 +9,8 @@ #include "ppapi/c/ppb_var.h" #include "ppapi/proxy/plugin_dispatcher.h" #include "ppapi/proxy/ppapi_messages.h" -#include "ppapi/proxy/interface_id.h" #include "ppapi/proxy/proxy_object_var.h" +#include "ppapi/shared_impl/api_id.h" #include "ppapi/shared_impl/var.h" namespace ppapi { @@ -240,13 +240,13 @@ void PluginVarTracker::SendAddRefObjectMsg( const ProxyObjectVar& proxy_object) { int unused; proxy_object.dispatcher()->Send(new PpapiHostMsg_PPBVar_AddRefObject( - INTERFACE_ID_PPB_VAR_DEPRECATED, proxy_object.host_var_id(), &unused)); + API_ID_PPB_VAR_DEPRECATED, proxy_object.host_var_id(), &unused)); } void PluginVarTracker::SendReleaseObjectMsg( const ProxyObjectVar& proxy_object) { proxy_object.dispatcher()->Send(new PpapiHostMsg_PPBVar_ReleaseObject( - INTERFACE_ID_PPB_VAR_DEPRECATED, proxy_object.host_var_id())); + API_ID_PPB_VAR_DEPRECATED, proxy_object.host_var_id())); } scoped_refptr<ProxyObjectVar> PluginVarTracker::FindOrMakePluginVarFromHostVar( diff --git a/ppapi/proxy/ppb_audio_proxy.cc b/ppapi/proxy/ppb_audio_proxy.cc index f1aedf7..2e5775b 100644 --- a/ppapi/proxy/ppb_audio_proxy.cc +++ b/ppapi/proxy/ppb_audio_proxy.cc @@ -12,9 +12,9 @@ #include "ppapi/c/ppb_var.h" #include "ppapi/c/trusted/ppb_audio_trusted.h" #include "ppapi/proxy/enter_proxy.h" -#include "ppapi/proxy/interface_id.h" #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/ppapi_globals.h" #include "ppapi/shared_impl/resource.h" @@ -88,7 +88,7 @@ PP_Bool Audio::StartPlayback() { SetStartPlaybackState(); PluginDispatcher::GetForResource(this)->Send( new PpapiHostMsg_PPBAudio_StartOrStop( - INTERFACE_ID_PPB_AUDIO, host_resource(), true)); + API_ID_PPB_AUDIO, host_resource(), true)); return PP_TRUE; } @@ -97,7 +97,7 @@ PP_Bool Audio::StopPlayback() { return PP_TRUE; PluginDispatcher::GetForResource(this)->Send( new PpapiHostMsg_PPBAudio_StartOrStop( - INTERFACE_ID_PPB_AUDIO, host_resource(), false)); + API_ID_PPB_AUDIO, host_resource(), false)); SetStopPlaybackState(); return PP_TRUE; } @@ -155,7 +155,7 @@ PP_Resource PPB_Audio_Proxy::CreateProxyResource( HostResource result; dispatcher->Send(new PpapiHostMsg_PPBAudio_Create( - INTERFACE_ID_PPB_AUDIO, instance_id, + API_ID_PPB_AUDIO, instance_id, config.object()->GetSampleRate(), config.object()->GetSampleFrameCount(), &result)); if (result.is_null()) @@ -283,7 +283,7 @@ void PPB_Audio_Proxy::AudioChannelConnected( // us, as long as the remote side always closes the handles it receives // (in OnMsgNotifyAudioStreamCreated), even in the failure case. dispatcher()->Send(new PpapiMsg_PPBAudio_NotifyAudioStreamCreated( - INTERFACE_ID_PPB_AUDIO, resource, result_code, socket_handle, + API_ID_PPB_AUDIO, resource, result_code, socket_handle, shared_memory, shared_memory_length)); } diff --git a/ppapi/proxy/ppb_audio_proxy.h b/ppapi/proxy/ppb_audio_proxy.h index b548e72..feee8dc 100644 --- a/ppapi/proxy/ppb_audio_proxy.h +++ b/ppapi/proxy/ppb_audio_proxy.h @@ -43,7 +43,7 @@ class PPB_Audio_Proxy : public InterfaceProxy { // InterfaceProxy implementation. virtual bool OnMessageReceived(const IPC::Message& msg); - static const InterfaceID kInterfaceID = INTERFACE_ID_PPB_AUDIO; + static const ApiID kApiID = API_ID_PPB_AUDIO; private: // Plugin->renderer message handlers. diff --git a/ppapi/proxy/ppb_broker_proxy.cc b/ppapi/proxy/ppb_broker_proxy.cc index d0f7112..d65af66 100644 --- a/ppapi/proxy/ppb_broker_proxy.cc +++ b/ppapi/proxy/ppb_broker_proxy.cc @@ -112,7 +112,7 @@ int32_t Broker::Connect(PP_CompletionCallback connect_callback) { bool success = PluginDispatcher::GetForResource(this)->Send( new PpapiHostMsg_PPBBroker_Connect( - INTERFACE_ID_PPB_BROKER, host_resource())); + API_ID_PPB_BROKER, host_resource())); return success ? PP_OK_COMPLETIONPENDING : PP_ERROR_FAILED; } @@ -160,7 +160,7 @@ PP_Resource PPB_Broker_Proxy::CreateProxyResource(PP_Instance instance) { HostResource result; dispatcher->Send(new PpapiHostMsg_PPBBroker_Create( - INTERFACE_ID_PPB_BROKER, instance, &result)); + API_ID_PPB_BROKER, instance, &result)); if (result.is_null()) return 0; return (new Broker(result))->GetReference(); @@ -248,7 +248,7 @@ void PPB_Broker_Proxy::ConnectCompleteInHost(int32_t result, foreign_socket_handle == IPC::InvalidPlatformFileForTransit()); bool success = dispatcher()->Send(new PpapiMsg_PPBBroker_ConnectComplete( - INTERFACE_ID_PPB_BROKER, broker, foreign_socket_handle, result)); + API_ID_PPB_BROKER, broker, foreign_socket_handle, result)); if (!success || result != PP_OK) { // The plugin did not receive the handle, so it must be closed. diff --git a/ppapi/proxy/ppb_broker_proxy.h b/ppapi/proxy/ppb_broker_proxy.h index 54ff9de..572cf79 100644 --- a/ppapi/proxy/ppb_broker_proxy.h +++ b/ppapi/proxy/ppb_broker_proxy.h @@ -30,7 +30,7 @@ class PPB_Broker_Proxy : public InterfaceProxy { // InterfaceProxy implementation. virtual bool OnMessageReceived(const IPC::Message& msg); - static const InterfaceID kInterfaceID = INTERFACE_ID_PPB_BROKER; + static const ApiID kApiID = API_ID_PPB_BROKER; private: // Message handlers. diff --git a/ppapi/proxy/ppb_buffer_proxy.cc b/ppapi/proxy/ppb_buffer_proxy.cc index 957108a..c7aba70 100644 --- a/ppapi/proxy/ppb_buffer_proxy.cc +++ b/ppapi/proxy/ppb_buffer_proxy.cc @@ -78,7 +78,7 @@ PP_Resource PPB_Buffer_Proxy::CreateProxyResource(PP_Instance instance, HostResource result; base::SharedMemoryHandle shm_handle = base::SharedMemory::NULLHandle(); dispatcher->Send(new PpapiHostMsg_PPBBuffer_Create( - INTERFACE_ID_PPB_BUFFER, instance, size, + API_ID_PPB_BUFFER, instance, size, &result, &shm_handle)); if (result.is_null() || !base::SharedMemory::IsHandleValid(shm_handle)) return 0; diff --git a/ppapi/proxy/ppb_buffer_proxy.h b/ppapi/proxy/ppb_buffer_proxy.h index 4105dcc..9b39c2c 100644 --- a/ppapi/proxy/ppb_buffer_proxy.h +++ b/ppapi/proxy/ppb_buffer_proxy.h @@ -58,7 +58,7 @@ class PPB_Buffer_Proxy : public InterfaceProxy { // InterfaceProxy implementation. virtual bool OnMessageReceived(const IPC::Message& msg); - static const InterfaceID kInterfaceID = INTERFACE_ID_PPB_BUFFER; + static const ApiID kApiID = API_ID_PPB_BUFFER; private: // Message handlers. diff --git a/ppapi/proxy/ppb_context_3d_proxy.cc b/ppapi/proxy/ppb_context_3d_proxy.cc index 460c922..dd8b030 100644 --- a/ppapi/proxy/ppb_context_3d_proxy.cc +++ b/ppapi/proxy/ppb_context_3d_proxy.cc @@ -140,7 +140,7 @@ bool PepperCommandBuffer::Initialize(int32 size) { // for NaCl. base::SharedMemoryHandle handle; if (Send(new PpapiHostMsg_PPBContext3D_Initialize( - INTERFACE_ID_PPB_CONTEXT_3D, resource_, size, &handle)) && + API_ID_PPB_CONTEXT_3D, resource_, size, &handle)) && base::SharedMemory::IsHandleValid(handle)) { ring_buffer_.reset(new base::SharedMemory(handle, false)); if (ring_buffer_->Map(size)) { @@ -174,7 +174,7 @@ gpu::CommandBuffer::State PepperCommandBuffer::GetState() { if (last_state_.error == gpu::error::kNoError) { gpu::CommandBuffer::State state; if (Send(new PpapiHostMsg_PPBContext3D_GetState( - INTERFACE_ID_PPB_CONTEXT_3D, resource_, &state))) + API_ID_PPB_CONTEXT_3D, resource_, &state))) UpdateState(state); } @@ -190,7 +190,7 @@ void PepperCommandBuffer::Flush(int32 put_offset) { return; IPC::Message* message = new PpapiHostMsg_PPBContext3D_AsyncFlush( - INTERFACE_ID_PPB_CONTEXT_3D, resource_, put_offset); + API_ID_PPB_CONTEXT_3D, resource_, put_offset); // Do not let a synchronous flush hold up this message. If this handler is // deferred until after the synchronous flush completes, it will overwrite the @@ -206,7 +206,7 @@ gpu::CommandBuffer::State PepperCommandBuffer::FlushSync( if (last_state_.error == gpu::error::kNoError) { gpu::CommandBuffer::State state; if (Send(new PpapiHostMsg_PPBContext3D_Flush( - INTERFACE_ID_PPB_CONTEXT_3D, resource_, put_offset, + API_ID_PPB_CONTEXT_3D, resource_, put_offset, last_known_get, &state))) UpdateState(state); } @@ -226,7 +226,7 @@ int32 PepperCommandBuffer::CreateTransferBuffer(size_t size, int32 id_request) { if (last_state_.error == gpu::error::kNoError) { int32 id; if (Send(new PpapiHostMsg_PPBContext3D_CreateTransferBuffer( - INTERFACE_ID_PPB_CONTEXT_3D, resource_, size, &id))) { + API_ID_PPB_CONTEXT_3D, resource_, size, &id))) { return id; } } @@ -257,7 +257,7 @@ void PepperCommandBuffer::DestroyTransferBuffer(int32 id) { transfer_buffers_.erase(it); Send(new PpapiHostMsg_PPBContext3D_DestroyTransferBuffer( - INTERFACE_ID_PPB_CONTEXT_3D, resource_, id)); + API_ID_PPB_CONTEXT_3D, resource_, id)); } gpu::Buffer PepperCommandBuffer::GetTransferBuffer(int32 id) { @@ -276,7 +276,7 @@ gpu::Buffer PepperCommandBuffer::GetTransferBuffer(int32 id) { base::SharedMemoryHandle handle; uint32 size; if (!Send(new PpapiHostMsg_PPBContext3D_GetTransferBuffer( - INTERFACE_ID_PPB_CONTEXT_3D, resource_, id, &handle, &size))) { + API_ID_PPB_CONTEXT_3D, resource_, id, &handle, &size))) { return gpu::Buffer(); } @@ -413,7 +413,7 @@ int32_t Context3D::BindSurfaces(PP_Resource pp_draw, PP_Resource pp_read) { int32_t result; PluginDispatcher::GetForResource(this)->Send( new PpapiHostMsg_PPBContext3D_BindSurfaces( - INTERFACE_ID_PPB_CONTEXT_3D, + API_ID_PPB_CONTEXT_3D, host_resource(), host_draw, host_read, &result)); if (result != PP_OK) return result; @@ -547,7 +547,7 @@ PP_Resource PPB_Context3D_Proxy::Create(PP_Instance instance, HostResource result; dispatcher->Send(new PpapiHostMsg_PPBContext3D_Create( - INTERFACE_ID_PPB_CONTEXT_3D, instance, config, attribs, &result)); + API_ID_PPB_CONTEXT_3D, instance, config, attribs, &result)); if (result.is_null()) return 0; diff --git a/ppapi/proxy/ppb_context_3d_proxy.h b/ppapi/proxy/ppb_context_3d_proxy.h index 9670f3a..2fb52c6 100644 --- a/ppapi/proxy/ppb_context_3d_proxy.h +++ b/ppapi/proxy/ppb_context_3d_proxy.h @@ -105,7 +105,7 @@ class PPB_Context3D_Proxy : public InterfaceProxy { // InterfaceProxy implementation. virtual bool OnMessageReceived(const IPC::Message& msg); - static const InterfaceID kInterfaceID = INTERFACE_ID_PPB_CONTEXT_3D; + static const ApiID kApiID = API_ID_PPB_CONTEXT_3D; private: void OnMsgCreate(PP_Instance instance, diff --git a/ppapi/proxy/ppb_core_proxy.h b/ppapi/proxy/ppb_core_proxy.h index 950e5e8..3e1cfae 100644 --- a/ppapi/proxy/ppb_core_proxy.h +++ b/ppapi/proxy/ppb_core_proxy.h @@ -27,7 +27,7 @@ class PPB_Core_Proxy : public InterfaceProxy { // InterfaceProxy implementation. virtual bool OnMessageReceived(const IPC::Message& msg); - static const InterfaceID kInterfaceID = INTERFACE_ID_PPB_CORE; + static const ApiID kApiID = API_ID_PPB_CORE; private: // Message handlers. diff --git a/ppapi/proxy/ppb_cursor_control_proxy.cc b/ppapi/proxy/ppb_cursor_control_proxy.cc index 960c010..a795975 100644 --- a/ppapi/proxy/ppb_cursor_control_proxy.cc +++ b/ppapi/proxy/ppb_cursor_control_proxy.cc @@ -51,7 +51,7 @@ PP_Bool PPB_CursorControl_Proxy::SetCursor(PP_Instance instance, PP_Bool result = PP_FALSE; PP_Point empty_point = { 0, 0 }; dispatcher()->Send(new PpapiHostMsg_PPBCursorControl_SetCursor( - INTERFACE_ID_PPB_CURSORCONTROL, + API_ID_PPB_CURSORCONTROL, instance, static_cast<int32_t>(type), cursor_image_resource, hot_spot ? *hot_spot : empty_point, &result)); return result; @@ -60,28 +60,28 @@ PP_Bool PPB_CursorControl_Proxy::SetCursor(PP_Instance instance, PP_Bool PPB_CursorControl_Proxy::LockCursor(PP_Instance instance) { PP_Bool result = PP_FALSE; dispatcher()->Send(new PpapiHostMsg_PPBCursorControl_LockCursor( - INTERFACE_ID_PPB_CURSORCONTROL, instance, &result)); + API_ID_PPB_CURSORCONTROL, instance, &result)); return result; } PP_Bool PPB_CursorControl_Proxy::UnlockCursor(PP_Instance instance) { PP_Bool result = PP_FALSE; dispatcher()->Send(new PpapiHostMsg_PPBCursorControl_UnlockCursor( - INTERFACE_ID_PPB_CURSORCONTROL, instance, &result)); + API_ID_PPB_CURSORCONTROL, instance, &result)); return result; } PP_Bool PPB_CursorControl_Proxy::HasCursorLock(PP_Instance instance) { PP_Bool result = PP_FALSE; dispatcher()->Send(new PpapiHostMsg_PPBCursorControl_HasCursorLock( - INTERFACE_ID_PPB_CURSORCONTROL, instance, &result)); + API_ID_PPB_CURSORCONTROL, instance, &result)); return result; } PP_Bool PPB_CursorControl_Proxy::CanLockCursor(PP_Instance instance) { PP_Bool result = PP_FALSE; dispatcher()->Send(new PpapiHostMsg_PPBCursorControl_CanLockCursor( - INTERFACE_ID_PPB_CURSORCONTROL, instance, &result)); + API_ID_PPB_CURSORCONTROL, instance, &result)); return result; } diff --git a/ppapi/proxy/ppb_cursor_control_proxy.h b/ppapi/proxy/ppb_cursor_control_proxy.h index 6c42c9b..5e9cfa8 100644 --- a/ppapi/proxy/ppb_cursor_control_proxy.h +++ b/ppapi/proxy/ppb_cursor_control_proxy.h @@ -44,7 +44,7 @@ class PPB_CursorControl_Proxy // InterfaceProxy implementation. virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; - static const InterfaceID kInterfaceID = INTERFACE_ID_PPB_CURSORCONTROL; + static const ApiID kApiID = API_ID_PPB_CURSORCONTROL; private: // Message handlers. diff --git a/ppapi/proxy/ppb_file_chooser_proxy.cc b/ppapi/proxy/ppb_file_chooser_proxy.cc index 1e55af6..734fb14 100644 --- a/ppapi/proxy/ppb_file_chooser_proxy.cc +++ b/ppapi/proxy/ppb_file_chooser_proxy.cc @@ -124,7 +124,7 @@ int32_t FileChooser::Show(bool require_user_gesture, current_show_callback_ = callback; PluginDispatcher::GetForResource(this)->Send( new PpapiHostMsg_PPBFileChooser_Show( - INTERFACE_ID_PPB_FILE_CHOOSER, + API_ID_PPB_FILE_CHOOSER, host_resource(), save_as, suggested_file_name ? suggested_file_name : "", @@ -173,7 +173,7 @@ const InterfaceProxy::Info* PPB_FileChooser_Proxy::GetTrustedInfo() { static const Info info = { thunk::GetPPB_FileChooser_Trusted_Thunk(), PPB_FILECHOOSER_TRUSTED_INTERFACE, - INTERFACE_ID_NONE, // FILE_CHOOSER is the canonical one. + API_ID_NONE, // FILE_CHOOSER is the canonical one. false, &CreateFileChooserProxy }; @@ -191,7 +191,7 @@ PP_Resource PPB_FileChooser_Proxy::CreateProxyResource( HostResource result; dispatcher->Send(new PpapiHostMsg_PPBFileChooser_Create( - INTERFACE_ID_PPB_FILE_CHOOSER, instance, + API_ID_PPB_FILE_CHOOSER, instance, mode, accept_mime_types ? accept_mime_types : "", &result)); @@ -268,7 +268,7 @@ void PPB_FileChooser_Proxy::OnShowCallback(int32_t result, std::vector<PPB_FileRef_CreateInfo> files; if (enter.succeeded() && result == PP_OK) { PPB_FileRef_Proxy* file_ref_proxy = static_cast<PPB_FileRef_Proxy*>( - dispatcher()->GetInterfaceProxy(INTERFACE_ID_PPB_FILE_REF)); + dispatcher()->GetInterfaceProxy(API_ID_PPB_FILE_REF)); // Convert the returned files to the serialized info. while (PP_Resource cur_file_resource = @@ -280,7 +280,7 @@ void PPB_FileChooser_Proxy::OnShowCallback(int32_t result, } dispatcher()->Send(new PpapiMsg_PPBFileChooser_ChooseComplete( - INTERFACE_ID_PPB_FILE_CHOOSER, chooser, result, files)); + API_ID_PPB_FILE_CHOOSER, chooser, result, files)); } } // namespace proxy diff --git a/ppapi/proxy/ppb_file_chooser_proxy.h b/ppapi/proxy/ppb_file_chooser_proxy.h index 51cac53..1256cd3 100644 --- a/ppapi/proxy/ppb_file_chooser_proxy.h +++ b/ppapi/proxy/ppb_file_chooser_proxy.h @@ -42,7 +42,7 @@ class PPB_FileChooser_Proxy : public InterfaceProxy { // InterfaceProxy implementation. virtual bool OnMessageReceived(const IPC::Message& msg); - static const InterfaceID kInterfaceID = INTERFACE_ID_PPB_FILE_CHOOSER; + static const ApiID kApiID = API_ID_PPB_FILE_CHOOSER; private: // Plugin -> host message handlers. diff --git a/ppapi/proxy/ppb_file_ref_proxy.cc b/ppapi/proxy/ppb_file_ref_proxy.cc index c9824a4..4577a12 100644 --- a/ppapi/proxy/ppb_file_ref_proxy.cc +++ b/ppapi/proxy/ppb_file_ref_proxy.cc @@ -58,14 +58,14 @@ FileRef::~FileRef() { PP_Resource FileRef::GetParent() { PPB_FileRef_CreateInfo create_info; GetDispatcher()->Send(new PpapiHostMsg_PPBFileRef_GetParent( - INTERFACE_ID_PPB_FILE_REF, host_resource(), &create_info)); + API_ID_PPB_FILE_REF, host_resource(), &create_info)); return PPB_FileRef_Proxy::DeserializeFileRef(create_info); } int32_t FileRef::MakeDirectory(PP_Bool make_ancestors, PP_CompletionCallback callback) { GetDispatcher()->Send(new PpapiHostMsg_PPBFileRef_MakeDirectory( - INTERFACE_ID_PPB_FILE_REF, host_resource(), make_ancestors, + API_ID_PPB_FILE_REF, host_resource(), make_ancestors, GetDispatcher()->callback_tracker().SendCallback(callback))); return PP_OK_COMPLETIONPENDING; } @@ -74,7 +74,7 @@ int32_t FileRef::Touch(PP_Time last_access_time, PP_Time last_modified_time, PP_CompletionCallback callback) { GetDispatcher()->Send(new PpapiHostMsg_PPBFileRef_Touch( - INTERFACE_ID_PPB_FILE_REF, host_resource(), + API_ID_PPB_FILE_REF, host_resource(), last_access_time, last_modified_time, GetDispatcher()->callback_tracker().SendCallback(callback))); return PP_OK_COMPLETIONPENDING; @@ -82,7 +82,7 @@ int32_t FileRef::Touch(PP_Time last_access_time, int32_t FileRef::Delete(PP_CompletionCallback callback) { GetDispatcher()->Send(new PpapiHostMsg_PPBFileRef_Delete( - INTERFACE_ID_PPB_FILE_REF, host_resource(), + API_ID_PPB_FILE_REF, host_resource(), GetDispatcher()->callback_tracker().SendCallback(callback))); return PP_OK_COMPLETIONPENDING; } @@ -96,7 +96,7 @@ int32_t FileRef::Rename(PP_Resource new_file_ref, return PP_ERROR_BADRESOURCE; GetDispatcher()->Send(new PpapiHostMsg_PPBFileRef_Rename( - INTERFACE_ID_PPB_FILE_REF, host_resource(), + API_ID_PPB_FILE_REF, host_resource(), new_file_ref_object->host_resource(), GetDispatcher()->callback_tracker().SendCallback(callback))); return PP_OK_COMPLETIONPENDING; @@ -120,7 +120,7 @@ PP_Resource PPB_FileRef_Proxy::CreateProxyResource(PP_Resource file_system, PPB_FileRef_CreateInfo create_info; PluginDispatcher::GetForResource(file_system_object)->Send( new PpapiHostMsg_PPBFileRef_Create( - INTERFACE_ID_PPB_FILE_REF, file_system_object->host_resource(), + API_ID_PPB_FILE_REF, file_system_object->host_resource(), path, &create_info)); return PPB_FileRef_Proxy::DeserializeFileRef(create_info); } diff --git a/ppapi/proxy/ppb_file_ref_proxy.h b/ppapi/proxy/ppb_file_ref_proxy.h index 6133c1a..de83e1c 100644 --- a/ppapi/proxy/ppb_file_ref_proxy.h +++ b/ppapi/proxy/ppb_file_ref_proxy.h @@ -55,7 +55,7 @@ class PPB_FileRef_Proxy : public InterfaceProxy { static PP_Resource DeserializeFileRef( const PPB_FileRef_CreateInfo& serialized); - static const InterfaceID kInterfaceID = INTERFACE_ID_PPB_FILE_REF; + static const ApiID kApiID = API_ID_PPB_FILE_REF; private: // Message handlers. diff --git a/ppapi/proxy/ppb_file_system_proxy.cc b/ppapi/proxy/ppb_file_system_proxy.cc index 606f2e0..dea7409 100644 --- a/ppapi/proxy/ppb_file_system_proxy.cc +++ b/ppapi/proxy/ppb_file_system_proxy.cc @@ -98,7 +98,7 @@ int32_t FileSystem::Open(int64_t expected_size, called_open_ = true; PluginDispatcher::GetForResource(this)->Send( new PpapiHostMsg_PPBFileSystem_Open( - INTERFACE_ID_PPB_FILE_SYSTEM, host_resource(), expected_size)); + API_ID_PPB_FILE_SYSTEM, host_resource(), expected_size)); return PP_OK_COMPLETIONPENDING; } @@ -122,7 +122,7 @@ const InterfaceProxy::Info* PPB_FileSystem_Proxy::GetInfo() { static const Info info = { thunk::GetPPB_FileSystem_Thunk(), PPB_FILESYSTEM_INTERFACE, - INTERFACE_ID_PPB_FILE_SYSTEM, + API_ID_PPB_FILE_SYSTEM, false, &CreateFileSystemProxy, }; @@ -139,7 +139,7 @@ PP_Resource PPB_FileSystem_Proxy::CreateProxyResource( HostResource result; dispatcher->Send(new PpapiHostMsg_PPBFileSystem_Create( - INTERFACE_ID_PPB_FILE_SYSTEM, instance, type, &result)); + API_ID_PPB_FILE_SYSTEM, instance, type, &result)); if (result.is_null()) return 0; return (new FileSystem(result, type))->GetReference(); @@ -190,7 +190,7 @@ void PPB_FileSystem_Proxy::OpenCompleteInHost( int32_t result, const HostResource& host_resource) { dispatcher()->Send(new PpapiMsg_PPBFileSystem_OpenComplete( - INTERFACE_ID_PPB_FILE_SYSTEM, host_resource, result)); + API_ID_PPB_FILE_SYSTEM, host_resource, result)); } } // namespace proxy diff --git a/ppapi/proxy/ppb_file_system_proxy.h b/ppapi/proxy/ppb_file_system_proxy.h index 5573cce..07e3929 100644 --- a/ppapi/proxy/ppb_file_system_proxy.h +++ b/ppapi/proxy/ppb_file_system_proxy.h @@ -37,7 +37,7 @@ class PPB_FileSystem_Proxy : public InterfaceProxy { // InterfaceProxy implementation. virtual bool OnMessageReceived(const IPC::Message& msg); - static const InterfaceID kInterfaceID = INTERFACE_ID_PPB_FILE_SYSTEM; + static const ApiID kApiID = API_ID_PPB_FILE_SYSTEM; private: // Message handlers. diff --git a/ppapi/proxy/ppb_flash_clipboard_proxy.cc b/ppapi/proxy/ppb_flash_clipboard_proxy.cc index 18918fc..5477280 100644 --- a/ppapi/proxy/ppb_flash_clipboard_proxy.cc +++ b/ppapi/proxy/ppb_flash_clipboard_proxy.cc @@ -39,7 +39,7 @@ PP_Bool IsFormatAvailable(PP_Instance instance_id, bool result = false; dispatcher->Send(new PpapiHostMsg_PPBFlashClipboard_IsFormatAvailable( - INTERFACE_ID_PPB_FLASH_CLIPBOARD, + API_ID_PPB_FLASH_CLIPBOARD, instance_id, static_cast<int>(clipboard_type), static_cast<int>(format), @@ -58,7 +58,7 @@ PP_Var ReadPlainText(PP_Instance instance_id, ReceiveSerializedVarReturnValue result; dispatcher->Send(new PpapiHostMsg_PPBFlashClipboard_ReadPlainText( - INTERFACE_ID_PPB_FLASH_CLIPBOARD, instance_id, + API_ID_PPB_FLASH_CLIPBOARD, instance_id, static_cast<int>(clipboard_type), &result)); return result.Return(dispatcher); } @@ -74,7 +74,7 @@ int32_t WritePlainText(PP_Instance instance_id, return PP_ERROR_BADARGUMENT; dispatcher->Send(new PpapiHostMsg_PPBFlashClipboard_WritePlainText( - INTERFACE_ID_PPB_FLASH_CLIPBOARD, + API_ID_PPB_FLASH_CLIPBOARD, instance_id, static_cast<int>(clipboard_type), SerializedVarSendInput(dispatcher, text))); @@ -111,7 +111,7 @@ const InterfaceProxy::Info* PPB_Flash_Clipboard_Proxy::GetInfo() { static const Info info = { &flash_clipboard_interface, PPB_FLASH_CLIPBOARD_INTERFACE, - INTERFACE_ID_PPB_FLASH_CLIPBOARD, + API_ID_PPB_FLASH_CLIPBOARD, false, &CreateFlashClipboardProxy }; diff --git a/ppapi/proxy/ppb_flash_file_proxy.cc b/ppapi/proxy/ppb_flash_file_proxy.cc index de5a40c..975c77a 100644 --- a/ppapi/proxy/ppb_flash_file_proxy.cc +++ b/ppapi/proxy/ppb_flash_file_proxy.cc @@ -178,7 +178,7 @@ void ModuleLocalThreadAdapter::Filter::OnFilterRemoved() { bool ModuleLocalThreadAdapter::Filter::OnMessageReceived( const IPC::Message& message) { if (!message.is_reply() || - message.routing_id() != INTERFACE_ID_PPB_FLASH_FILE_MODULELOCAL) + message.routing_id() != API_ID_PPB_FLASH_FILE_MODULELOCAL) return false; if (g_module_local_thread_adapter->OnModuleLocalMessageReceived(message)) { @@ -399,7 +399,7 @@ int32_t OpenModuleLocalFile(PP_Instance instance, IPC::PlatformFileForTransit transit; g_module_local_thread_adapter->Send(instance, new PpapiHostMsg_PPBFlashFile_ModuleLocal_OpenFile( - INTERFACE_ID_PPB_FLASH_FILE_MODULELOCAL, + API_ID_PPB_FLASH_FILE_MODULELOCAL, instance, path, mode, &transit, &result)); *file = IPC::PlatformFileForTransitToPlatformFile(transit); return result; @@ -414,7 +414,7 @@ int32_t RenameModuleLocalFile(PP_Instance instance, int32_t result = PP_ERROR_FAILED; g_module_local_thread_adapter->Send(instance, new PpapiHostMsg_PPBFlashFile_ModuleLocal_RenameFile( - INTERFACE_ID_PPB_FLASH_FILE_MODULELOCAL, + API_ID_PPB_FLASH_FILE_MODULELOCAL, instance, from_path, to_path, &result)); return result; } @@ -428,7 +428,7 @@ int32_t DeleteModuleLocalFileOrDir(PP_Instance instance, int32_t result = PP_ERROR_FAILED; g_module_local_thread_adapter->Send(instance, new PpapiHostMsg_PPBFlashFile_ModuleLocal_DeleteFileOrDir( - INTERFACE_ID_PPB_FLASH_FILE_MODULELOCAL, + API_ID_PPB_FLASH_FILE_MODULELOCAL, instance, path, recursive, &result)); return result; } @@ -440,7 +440,7 @@ int32_t CreateModuleLocalDir(PP_Instance instance, const char* path) { int32_t result = PP_ERROR_FAILED; g_module_local_thread_adapter->Send(instance, new PpapiHostMsg_PPBFlashFile_ModuleLocal_CreateDir( - INTERFACE_ID_PPB_FLASH_FILE_MODULELOCAL, instance, path, &result)); + API_ID_PPB_FLASH_FILE_MODULELOCAL, instance, path, &result)); return result; } @@ -453,7 +453,7 @@ int32_t QueryModuleLocalFile(PP_Instance instance, int32_t result = PP_ERROR_FAILED; g_module_local_thread_adapter->Send(instance, new PpapiHostMsg_PPBFlashFile_ModuleLocal_QueryFile( - INTERFACE_ID_PPB_FLASH_FILE_MODULELOCAL, instance, path, + API_ID_PPB_FLASH_FILE_MODULELOCAL, instance, path, info, &result)); return result; } @@ -468,7 +468,7 @@ int32_t GetModuleLocalDirContents(PP_Instance instance, std::vector<SerializedDirEntry> entries; g_module_local_thread_adapter->Send(instance, new PpapiHostMsg_PPBFlashFile_ModuleLocal_GetDirContents( - INTERFACE_ID_PPB_FLASH_FILE_MODULELOCAL, + API_ID_PPB_FLASH_FILE_MODULELOCAL, instance, path, &entries, &result)); if (result != PP_OK) @@ -529,7 +529,7 @@ const InterfaceProxy::Info* PPB_Flash_File_ModuleLocal_Proxy::GetInfo() { static const Info info = { &flash_file_modulelocal_interface, PPB_FLASH_FILE_MODULELOCAL_INTERFACE, - INTERFACE_ID_PPB_FLASH_FILE_MODULELOCAL, + API_ID_PPB_FLASH_FILE_MODULELOCAL, true, &CreateFlashFileModuleLocalProxy, }; @@ -643,7 +643,7 @@ int32_t OpenFileRefFile(PP_Resource file_ref_id, int32_t result = PP_ERROR_FAILED; IPC::PlatformFileForTransit transit; dispatcher->Send(new PpapiHostMsg_PPBFlashFile_FileRef_OpenFile( - INTERFACE_ID_PPB_FLASH_FILE_FILEREF, + API_ID_PPB_FLASH_FILE_FILEREF, file_ref->host_resource(), mode, &transit, &result)); *file = IPC::PlatformFileForTransitToPlatformFile(transit); return result; @@ -662,7 +662,7 @@ int32_t QueryFileRefFile(PP_Resource file_ref_id, int32_t result = PP_ERROR_FAILED; dispatcher->Send(new PpapiHostMsg_PPBFlashFile_FileRef_QueryFile( - INTERFACE_ID_PPB_FLASH_FILE_FILEREF, + API_ID_PPB_FLASH_FILE_FILEREF, file_ref->host_resource(), info, &result)); return result; } @@ -696,7 +696,7 @@ const InterfaceProxy::Info* PPB_Flash_File_FileRef_Proxy::GetInfo() { static const Info info = { &flash_file_fileref_interface, PPB_FLASH_FILE_FILEREF_INTERFACE, - INTERFACE_ID_PPB_FLASH_FILE_FILEREF, + API_ID_PPB_FLASH_FILE_FILEREF, true, &CreateFlashFileFileRefProxy, }; diff --git a/ppapi/proxy/ppb_flash_menu_proxy.cc b/ppapi/proxy/ppb_flash_menu_proxy.cc index fad5689..7ef79c5 100644 --- a/ppapi/proxy/ppb_flash_menu_proxy.cc +++ b/ppapi/proxy/ppb_flash_menu_proxy.cc @@ -66,7 +66,7 @@ int32_t FlashMenu::Show(const struct PP_Point* location, PluginDispatcher::GetForResource(this)->Send( new PpapiHostMsg_PPBFlashMenu_Show( - INTERFACE_ID_PPB_FLASH_MENU, host_resource(), *location)); + API_ID_PPB_FLASH_MENU, host_resource(), *location)); return PP_OK_COMPLETIONPENDING; } @@ -96,7 +96,7 @@ const InterfaceProxy::Info* PPB_Flash_Menu_Proxy::GetInfo() { static const Info info = { ppapi::thunk::GetPPB_Flash_Menu_Thunk(), PPB_FLASH_MENU_INTERFACE, - INTERFACE_ID_PPB_FLASH_MENU, + API_ID_PPB_FLASH_MENU, true, &CreateFlashMenuProxy, }; @@ -117,7 +117,7 @@ PP_Resource PPB_Flash_Menu_Proxy::CreateProxyResource( return 0; dispatcher->Send(new PpapiHostMsg_PPBFlashMenu_Create( - INTERFACE_ID_PPB_FLASH_MENU, instance_id, serialized_menu, &result)); + API_ID_PPB_FLASH_MENU, instance_id, serialized_menu, &result)); if (result.is_null()) return 0; return (new FlashMenu(result))->GetReference(); @@ -182,7 +182,7 @@ void PPB_Flash_Menu_Proxy::SendShowACKToPlugin( int32_t result, ShowRequest* request) { dispatcher()->Send(new PpapiMsg_PPBFlashMenu_ShowACK( - INTERFACE_ID_PPB_FLASH_MENU, + API_ID_PPB_FLASH_MENU, request->menu, request->selected_id, result)); diff --git a/ppapi/proxy/ppb_flash_net_connector_proxy.cc b/ppapi/proxy/ppb_flash_net_connector_proxy.cc index 323059e..dee1027 100644 --- a/ppapi/proxy/ppb_flash_net_connector_proxy.cc +++ b/ppapi/proxy/ppb_flash_net_connector_proxy.cc @@ -117,7 +117,7 @@ int32_t FlashNetConnector::ConnectTcp( PP_CompletionCallback callback) { return ConnectWithMessage( new PpapiHostMsg_PPBFlashNetConnector_ConnectTcp( - INTERFACE_ID_PPB_FLASH_NETCONNECTOR, host_resource(), host, port), + API_ID_PPB_FLASH_NETCONNECTOR, host_resource(), host, port), socket_out, local_addr_out, remote_addr_out, callback); } @@ -129,7 +129,7 @@ int32_t FlashNetConnector::ConnectTcpAddress( PP_CompletionCallback callback) { return ConnectWithMessage( new PpapiHostMsg_PPBFlashNetConnector_ConnectTcpAddress( - INTERFACE_ID_PPB_FLASH_NETCONNECTOR, + API_ID_PPB_FLASH_NETCONNECTOR, host_resource(), NetAddressToString(*addr)), socket_out, local_addr_out, remote_addr_out, callback); } @@ -209,7 +209,7 @@ const InterfaceProxy::Info* PPB_Flash_NetConnector_Proxy::GetInfo() { static const Info info = { ppapi::thunk::GetPPB_Flash_NetConnector_Thunk(), PPB_FLASH_NETCONNECTOR_INTERFACE, - INTERFACE_ID_PPB_FLASH_NETCONNECTOR, + API_ID_PPB_FLASH_NETCONNECTOR, false, &CreateFlashNetConnectorProxy }; @@ -225,7 +225,7 @@ PP_Resource PPB_Flash_NetConnector_Proxy::CreateProxyResource( HostResource result; dispatcher->Send(new PpapiHostMsg_PPBFlashNetConnector_Create( - INTERFACE_ID_PPB_FLASH_NETCONNECTOR, instance, &result)); + API_ID_PPB_FLASH_NETCONNECTOR, instance, &result)); if (result.is_null()) return 0; return (new FlashNetConnector(result))->GetReference(); @@ -324,7 +324,7 @@ void PPB_Flash_NetConnector_Proxy::OnCompleteCallbackInHost( if (result == PP_OK) { dispatcher()->Send(new PpapiMsg_PPBFlashNetConnector_ConnectACK( - INTERFACE_ID_PPB_FLASH_NETCONNECTOR, + API_ID_PPB_FLASH_NETCONNECTOR, info->resource, result, dispatcher()->ShareHandleWithRemote( static_cast<base::PlatformFile>(info->handle), true), @@ -332,7 +332,7 @@ void PPB_Flash_NetConnector_Proxy::OnCompleteCallbackInHost( NetAddressToString(info->remote_addr))); } else { dispatcher()->Send(new PpapiMsg_PPBFlashNetConnector_ConnectACK( - INTERFACE_ID_PPB_FLASH_NETCONNECTOR, + API_ID_PPB_FLASH_NETCONNECTOR, info->resource, result, IPC::InvalidPlatformFileForTransit(), std::string(), std::string())); } diff --git a/ppapi/proxy/ppb_flash_proxy.cc b/ppapi/proxy/ppb_flash_proxy.cc index b1d0d22..4b23f87 100644 --- a/ppapi/proxy/ppb_flash_proxy.cc +++ b/ppapi/proxy/ppb_flash_proxy.cc @@ -35,7 +35,7 @@ void SetInstanceAlwaysOnTop(PP_Instance pp_instance, PP_Bool on_top) { PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(pp_instance); if (dispatcher) { dispatcher->Send(new PpapiHostMsg_PPBFlash_SetInstanceAlwaysOnTop( - INTERFACE_ID_PPB_FLASH, pp_instance, on_top)); + API_ID_PPB_FLASH, pp_instance, on_top)); } } @@ -83,7 +83,7 @@ PP_Bool DrawGlyphs(PP_Instance instance, PP_Bool result = PP_FALSE; dispatcher->Send(new PpapiHostMsg_PPBFlash_DrawGlyphs( - INTERFACE_ID_PPB_FLASH, params, &result)); + API_ID_PPB_FLASH, params, &result)); return result; } @@ -94,7 +94,7 @@ PP_Var GetProxyForURL(PP_Instance instance, const char* url) { ReceiveSerializedVarReturnValue result; dispatcher->Send(new PpapiHostMsg_PPBFlash_GetProxyForURL( - INTERFACE_ID_PPB_FLASH, instance, url, &result)); + API_ID_PPB_FLASH, instance, url, &result)); return result.Return(dispatcher); } @@ -112,7 +112,7 @@ int32_t Navigate(PP_Resource request_id, int32_t result = PP_ERROR_FAILED; dispatcher->Send(new PpapiHostMsg_PPBFlash_Navigate( - INTERFACE_ID_PPB_FLASH, + API_ID_PPB_FLASH, instance, enter.object()->GetData(), target, from_user_action, &result)); return result; @@ -123,7 +123,7 @@ void RunMessageLoop(PP_Instance instance) { if (!dispatcher) return; IPC::SyncMessage* msg = new PpapiHostMsg_PPBFlash_RunMessageLoop( - INTERFACE_ID_PPB_FLASH, instance); + API_ID_PPB_FLASH, instance); msg->EnableMessagePumping(); dispatcher->Send(msg); } @@ -133,7 +133,7 @@ void QuitMessageLoop(PP_Instance instance) { if (!dispatcher) return; dispatcher->Send(new PpapiHostMsg_PPBFlash_QuitMessageLoop( - INTERFACE_ID_PPB_FLASH, instance)); + API_ID_PPB_FLASH, instance)); } double GetLocalTimeZoneOffset(PP_Instance instance, PP_Time t) { @@ -149,7 +149,7 @@ double GetLocalTimeZoneOffset(PP_Instance instance, PP_Time t) { // this message rather than proxy it through some instance in a renderer. double result = 0; dispatcher->Send(new PpapiHostMsg_PPBFlash_GetLocalTimeZoneOffset( - INTERFACE_ID_PPB_FLASH, instance, t, &result)); + API_ID_PPB_FLASH, instance, t, &result)); return result; } @@ -191,7 +191,7 @@ const InterfaceProxy::Info* PPB_Flash_Proxy::GetInfo() { static const Info info = { &flash_interface, PPB_FLASH_INTERFACE, - INTERFACE_ID_PPB_FLASH, + API_ID_PPB_FLASH, true, &CreateFlashProxy, }; diff --git a/ppapi/proxy/ppb_flash_tcp_socket_proxy.cc b/ppapi/proxy/ppb_flash_tcp_socket_proxy.cc index 020cf28..13de6fa5 100644 --- a/ppapi/proxy/ppb_flash_tcp_socket_proxy.cc +++ b/ppapi/proxy/ppb_flash_tcp_socket_proxy.cc @@ -406,7 +406,7 @@ const InterfaceProxy::Info* PPB_Flash_TCPSocket_Proxy::GetInfo() { static const Info info = { thunk::GetPPB_Flash_TCPSocket_Thunk(), PPB_FLASH_TCPSOCKET_INTERFACE, - INTERFACE_ID_PPB_FLASH_TCPSOCKET, + API_ID_PPB_FLASH_TCPSOCKET, false, &CreateFlashTCPSocketProxy, }; @@ -422,7 +422,7 @@ PP_Resource PPB_Flash_TCPSocket_Proxy::CreateProxyResource( uint32 socket_id = 0; dispatcher->SendToBrowser(new PpapiHostMsg_PPBFlashTCPSocket_Create( - INTERFACE_ID_PPB_FLASH_TCPSOCKET, dispatcher->plugin_dispatcher_id(), + API_ID_PPB_FLASH_TCPSOCKET, dispatcher->plugin_dispatcher_id(), &socket_id)); if (socket_id == 0) return 0; diff --git a/ppapi/proxy/ppb_flash_udp_socket_proxy.cc b/ppapi/proxy/ppb_flash_udp_socket_proxy.cc index ffeef4a..3fa0316 100644 --- a/ppapi/proxy/ppb_flash_udp_socket_proxy.cc +++ b/ppapi/proxy/ppb_flash_udp_socket_proxy.cc @@ -301,7 +301,7 @@ const InterfaceProxy::Info* PPB_Flash_UDPSocket_Proxy::GetInfo() { static const Info info = { ::ppapi::thunk::GetPPB_Flash_UDPSocket_Thunk(), PPB_FLASH_UDPSOCKET_INTERFACE, - INTERFACE_ID_PPB_FLASH_UDPSOCKET, + API_ID_PPB_FLASH_UDPSOCKET, false, &CreateFlashUDPSocketProxy, }; @@ -317,7 +317,7 @@ PP_Resource PPB_Flash_UDPSocket_Proxy::CreateProxyResource( uint32 socket_id = 0; dispatcher->SendToBrowser(new PpapiHostMsg_PPBFlashUDPSocket_Create( - INTERFACE_ID_PPB_FLASH_UDPSOCKET, dispatcher->plugin_dispatcher_id(), + API_ID_PPB_FLASH_UDPSOCKET, dispatcher->plugin_dispatcher_id(), &socket_id)); if (socket_id == 0) return 0; diff --git a/ppapi/proxy/ppb_font_proxy.h b/ppapi/proxy/ppb_font_proxy.h index d7af485..9deb31f 100644 --- a/ppapi/proxy/ppb_font_proxy.h +++ b/ppapi/proxy/ppb_font_proxy.h @@ -36,7 +36,7 @@ class PPB_Font_Proxy : public InterfaceProxy, // InterfaceProxy implementation. virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; - static const InterfaceID kInterfaceID = INTERFACE_ID_PPB_FONT; + static const ApiID kApiID = API_ID_PPB_FONT; private: DISALLOW_COPY_AND_ASSIGN(PPB_Font_Proxy); diff --git a/ppapi/proxy/ppb_graphics_2d_proxy.cc b/ppapi/proxy/ppb_graphics_2d_proxy.cc index 7bed679..3b630ea 100644 --- a/ppapi/proxy/ppb_graphics_2d_proxy.cc +++ b/ppapi/proxy/ppb_graphics_2d_proxy.cc @@ -95,7 +95,7 @@ void Graphics2D::PaintImageData(PP_Resource image_data, PP_Rect dummy; memset(&dummy, 0, sizeof(PP_Rect)); GetDispatcher()->Send(new PpapiHostMsg_PPBGraphics2D_PaintImageData( - INTERFACE_ID_PPB_GRAPHICS_2D, host_resource(), + API_ID_PPB_GRAPHICS_2D, host_resource(), image_object->host_resource(), *top_left, !!src_rect, src_rect ? *src_rect : dummy)); } @@ -105,7 +105,7 @@ void Graphics2D::Scroll(const PP_Rect* clip_rect, PP_Rect dummy; memset(&dummy, 0, sizeof(PP_Rect)); GetDispatcher()->Send(new PpapiHostMsg_PPBGraphics2D_Scroll( - INTERFACE_ID_PPB_GRAPHICS_2D, host_resource(), + API_ID_PPB_GRAPHICS_2D, host_resource(), !!clip_rect, clip_rect ? *clip_rect : dummy, *amount)); } @@ -116,7 +116,7 @@ void Graphics2D::ReplaceContents(PP_Resource image_data) { return; GetDispatcher()->Send(new PpapiHostMsg_PPBGraphics2D_ReplaceContents( - INTERFACE_ID_PPB_GRAPHICS_2D, host_resource(), + API_ID_PPB_GRAPHICS_2D, host_resource(), image_object->host_resource())); } @@ -131,7 +131,7 @@ int32_t Graphics2D::Flush(PP_CompletionCallback callback) { current_flush_callback_ = callback; GetDispatcher()->Send(new PpapiHostMsg_PPBGraphics2D_Flush( - INTERFACE_ID_PPB_GRAPHICS_2D, host_resource())); + API_ID_PPB_GRAPHICS_2D, host_resource())); return PP_OK_COMPLETIONPENDING; } @@ -158,7 +158,7 @@ PP_Resource PPB_Graphics2D_Proxy::CreateProxyResource( HostResource result; dispatcher->Send(new PpapiHostMsg_ResourceCreation_Graphics2D( - INTERFACE_ID_RESOURCE_CREATION, instance, size, is_always_opaque, + API_ID_RESOURCE_CREATION, instance, size, is_always_opaque, &result)); if (result.is_null()) return 0; @@ -237,7 +237,7 @@ void PPB_Graphics2D_Proxy::SendFlushACKToPlugin( int32_t result, const HostResource& graphics_2d) { dispatcher()->Send(new PpapiMsg_PPBGraphics2D_FlushACK( - INTERFACE_ID_PPB_GRAPHICS_2D, graphics_2d, result)); + API_ID_PPB_GRAPHICS_2D, graphics_2d, result)); } } // namespace proxy diff --git a/ppapi/proxy/ppb_graphics_2d_proxy.h b/ppapi/proxy/ppb_graphics_2d_proxy.h index 59b4b1b..c872871c 100644 --- a/ppapi/proxy/ppb_graphics_2d_proxy.h +++ b/ppapi/proxy/ppb_graphics_2d_proxy.h @@ -36,7 +36,7 @@ class PPB_Graphics2D_Proxy : public InterfaceProxy { // InterfaceProxy implementation. virtual bool OnMessageReceived(const IPC::Message& msg); - static const InterfaceID kInterfaceID = INTERFACE_ID_PPB_GRAPHICS_2D; + static const ApiID kApiID = API_ID_PPB_GRAPHICS_2D; private: // Plugin->renderer message handlers. diff --git a/ppapi/proxy/ppb_graphics_3d_proxy.cc b/ppapi/proxy/ppb_graphics_3d_proxy.cc index e184ef0..0bb7440 100644 --- a/ppapi/proxy/ppb_graphics_3d_proxy.cc +++ b/ppapi/proxy/ppb_graphics_3d_proxy.cc @@ -92,7 +92,7 @@ bool CommandBuffer::Initialize(int32 size) { // for NaCl. base::SharedMemoryHandle handle; if (Send(new PpapiHostMsg_PPBGraphics3D_InitCommandBuffer( - INTERFACE_ID_PPB_GRAPHICS_3D, resource_, size, &handle)) && + API_ID_PPB_GRAPHICS_3D, resource_, size, &handle)) && base::SharedMemory::IsHandleValid(handle)) { ring_buffer_.reset(new base::SharedMemory(handle, false)); if (ring_buffer_->Map(size)) { @@ -126,7 +126,7 @@ gpu::CommandBuffer::State CommandBuffer::GetState() { if (last_state_.error == gpu::error::kNoError) { gpu::CommandBuffer::State state; if (Send(new PpapiHostMsg_PPBGraphics3D_GetState( - INTERFACE_ID_PPB_GRAPHICS_3D, resource_, &state))) + API_ID_PPB_GRAPHICS_3D, resource_, &state))) UpdateState(state); } @@ -142,7 +142,7 @@ void CommandBuffer::Flush(int32 put_offset) { return; IPC::Message* message = new PpapiHostMsg_PPBGraphics3D_AsyncFlush( - INTERFACE_ID_PPB_GRAPHICS_3D, resource_, put_offset); + API_ID_PPB_GRAPHICS_3D, resource_, put_offset); // Do not let a synchronous flush hold up this message. If this handler is // deferred until after the synchronous flush completes, it will overwrite the @@ -158,7 +158,7 @@ gpu::CommandBuffer::State CommandBuffer::FlushSync(int32 put_offset, if (last_state_.error == gpu::error::kNoError) { gpu::CommandBuffer::State state; if (Send(new PpapiHostMsg_PPBGraphics3D_Flush( - INTERFACE_ID_PPB_GRAPHICS_3D, resource_, put_offset, + API_ID_PPB_GRAPHICS_3D, resource_, put_offset, last_known_get, &state))) UpdateState(state); } @@ -178,7 +178,7 @@ int32 CommandBuffer::CreateTransferBuffer(size_t size, int32 id_request) { if (last_state_.error == gpu::error::kNoError) { int32 id; if (Send(new PpapiHostMsg_PPBGraphics3D_CreateTransferBuffer( - INTERFACE_ID_PPB_GRAPHICS_3D, resource_, size, &id))) { + API_ID_PPB_GRAPHICS_3D, resource_, size, &id))) { return id; } } @@ -209,7 +209,7 @@ void CommandBuffer::DestroyTransferBuffer(int32 id) { transfer_buffers_.erase(it); Send(new PpapiHostMsg_PPBGraphics3D_DestroyTransferBuffer( - INTERFACE_ID_PPB_GRAPHICS_3D, resource_, id)); + API_ID_PPB_GRAPHICS_3D, resource_, id)); } gpu::Buffer CommandBuffer::GetTransferBuffer(int32 id) { @@ -228,7 +228,7 @@ gpu::Buffer CommandBuffer::GetTransferBuffer(int32 id) { base::SharedMemoryHandle handle; uint32 size; if (!Send(new PpapiHostMsg_PPBGraphics3D_GetTransferBuffer( - INTERFACE_ID_PPB_GRAPHICS_3D, resource_, id, &handle, &size))) { + API_ID_PPB_GRAPHICS_3D, resource_, id, &handle, &size))) { return gpu::Buffer(); } @@ -383,7 +383,7 @@ gpu::CommandBuffer* Graphics3D::GetCommandBuffer() { int32 Graphics3D::DoSwapBuffers() { IPC::Message* msg = new PpapiHostMsg_PPBGraphics3D_SwapBuffers( - INTERFACE_ID_PPB_GRAPHICS_3D, host_resource()); + API_ID_PPB_GRAPHICS_3D, host_resource()); msg->set_unblock(true); PluginDispatcher::GetForResource(this)->Send(msg); @@ -426,7 +426,7 @@ PP_Resource PPB_Graphics3D_Proxy::CreateProxyResource( HostResource result; dispatcher->Send(new PpapiHostMsg_PPBGraphics3D_Create( - INTERFACE_ID_PPB_GRAPHICS_3D, instance, attribs, &result)); + API_ID_PPB_GRAPHICS_3D, instance, attribs, &result)); if (result.is_null()) return 0; @@ -584,7 +584,7 @@ void PPB_Graphics3D_Proxy::SendSwapBuffersACKToPlugin( int32_t result, const HostResource& context) { dispatcher()->Send(new PpapiMsg_PPBGraphics3D_SwapBuffersACK( - INTERFACE_ID_PPB_GRAPHICS_3D, context, result)); + API_ID_PPB_GRAPHICS_3D, context, result)); } } // namespace proxy diff --git a/ppapi/proxy/ppb_graphics_3d_proxy.h b/ppapi/proxy/ppb_graphics_3d_proxy.h index ef2b70b..472c2a7 100644 --- a/ppapi/proxy/ppb_graphics_3d_proxy.h +++ b/ppapi/proxy/ppb_graphics_3d_proxy.h @@ -73,7 +73,7 @@ class PPB_Graphics3D_Proxy : public InterfaceProxy { // InterfaceProxy implementation. virtual bool OnMessageReceived(const IPC::Message& msg); - static const InterfaceID kInterfaceID = INTERFACE_ID_PPB_GRAPHICS_3D; + static const ApiID kApiID = API_ID_PPB_GRAPHICS_3D; private: void OnMsgCreate(PP_Instance instance, diff --git a/ppapi/proxy/ppb_instance_proxy.cc b/ppapi/proxy/ppb_instance_proxy.cc index f11f396..998ae8b 100644 --- a/ppapi/proxy/ppb_instance_proxy.cc +++ b/ppapi/proxy/ppb_instance_proxy.cc @@ -52,7 +52,7 @@ const InterfaceProxy::Info* PPB_Instance_Proxy::GetInfoPrivate() { static const Info info = { ppapi::thunk::GetPPB_Instance_Private_Thunk(), PPB_INSTANCE_PRIVATE_INTERFACE, - INTERFACE_ID_NONE, // 1_0 is the canonical one. + API_ID_NONE, // 1_0 is the canonical one. false, &CreateInstanceProxy, }; @@ -130,7 +130,7 @@ PP_Bool PPB_Instance_Proxy::BindGraphics(PP_Instance instance, PP_Bool result = PP_FALSE; dispatcher()->Send(new PpapiHostMsg_PPBInstance_BindGraphics( - INTERFACE_ID_PPB_INSTANCE, instance, object->host_resource(), + API_ID_PPB_INSTANCE, instance, object->host_resource(), &result)); return result; } @@ -138,21 +138,21 @@ PP_Bool PPB_Instance_Proxy::BindGraphics(PP_Instance instance, PP_Bool PPB_Instance_Proxy::IsFullFrame(PP_Instance instance) { PP_Bool result = PP_FALSE; dispatcher()->Send(new PpapiHostMsg_PPBInstance_IsFullFrame( - INTERFACE_ID_PPB_INSTANCE, instance, &result)); + API_ID_PPB_INSTANCE, instance, &result)); return result; } PP_Var PPB_Instance_Proxy::GetWindowObject(PP_Instance instance) { ReceiveSerializedVarReturnValue result; dispatcher()->Send(new PpapiHostMsg_PPBInstance_GetWindowObject( - INTERFACE_ID_PPB_INSTANCE, instance, &result)); + API_ID_PPB_INSTANCE, instance, &result)); return result.Return(dispatcher()); } PP_Var PPB_Instance_Proxy::GetOwnerElementObject(PP_Instance instance) { ReceiveSerializedVarReturnValue result; dispatcher()->Send(new PpapiHostMsg_PPBInstance_GetOwnerElementObject( - INTERFACE_ID_PPB_INSTANCE, instance, &result)); + API_ID_PPB_INSTANCE, instance, &result)); return result.Return(dispatcher()); } @@ -165,7 +165,7 @@ PP_Var PPB_Instance_Proxy::ExecuteScript(PP_Instance instance, ReceiveSerializedVarReturnValue result; dispatcher()->Send(new PpapiHostMsg_PPBInstance_ExecuteScript( - INTERFACE_ID_PPB_INSTANCE, instance, + API_ID_PPB_INSTANCE, instance, SerializedVarSendInput(dispatcher(), script), &se, &result)); return result.Return(dispatcher()); } @@ -177,7 +177,7 @@ PP_Var PPB_Instance_Proxy::GetDefaultCharSet(PP_Instance instance) { ReceiveSerializedVarReturnValue result; dispatcher->Send(new PpapiHostMsg_PPBInstance_GetDefaultCharSet( - INTERFACE_ID_PPB_INSTANCE, instance, &result)); + API_ID_PPB_INSTANCE, instance, &result)); return result.Return(dispatcher); } @@ -185,7 +185,7 @@ void PPB_Instance_Proxy::Log(PP_Instance instance, int log_level, PP_Var value) { dispatcher()->Send(new PpapiHostMsg_PPBInstance_Log( - INTERFACE_ID_PPB_INSTANCE, instance, static_cast<int>(log_level), + API_ID_PPB_INSTANCE, instance, static_cast<int>(log_level), SerializedVarSendInput(dispatcher(), value))); } @@ -194,7 +194,7 @@ void PPB_Instance_Proxy::LogWithSource(PP_Instance instance, PP_Var source, PP_Var value) { dispatcher()->Send(new PpapiHostMsg_PPBInstance_LogWithSource( - INTERFACE_ID_PPB_INSTANCE, instance, static_cast<int>(log_level), + API_ID_PPB_INSTANCE, instance, static_cast<int>(log_level), SerializedVarSendInput(dispatcher(), source), SerializedVarSendInput(dispatcher(), value))); } @@ -230,7 +230,7 @@ PP_Bool PPB_Instance_Proxy::SetFullscreen(PP_Instance instance, PP_Bool fullscreen) { PP_Bool result = PP_FALSE; dispatcher()->Send(new PpapiHostMsg_PPBInstance_SetFullscreen( - INTERFACE_ID_PPB_INSTANCE, instance, fullscreen, &result)); + API_ID_PPB_INSTANCE, instance, fullscreen, &result)); return result; } @@ -238,7 +238,7 @@ PP_Bool PPB_Instance_Proxy::FlashSetFullscreen(PP_Instance instance, PP_Bool fullscreen) { PP_Bool result = PP_FALSE; dispatcher()->Send(new PpapiHostMsg_PPBInstance_FlashSetFullscreen( - INTERFACE_ID_PPB_INSTANCE, instance, fullscreen, &result)); + API_ID_PPB_INSTANCE, instance, fullscreen, &result)); return result; } @@ -246,7 +246,7 @@ PP_Bool PPB_Instance_Proxy::GetScreenSize(PP_Instance instance, PP_Size* size) { PP_Bool result = PP_FALSE; dispatcher()->Send(new PpapiHostMsg_PPBInstance_GetScreenSize( - INTERFACE_ID_PPB_INSTANCE, instance, &result, size)); + API_ID_PPB_INSTANCE, instance, &result, size)); return result; } @@ -254,14 +254,14 @@ PP_Bool PPB_Instance_Proxy::FlashGetScreenSize(PP_Instance instance, PP_Size* size) { PP_Bool result = PP_FALSE; dispatcher()->Send(new PpapiHostMsg_PPBInstance_FlashGetScreenSize( - INTERFACE_ID_PPB_INSTANCE, instance, &result, size)); + API_ID_PPB_INSTANCE, instance, &result, size)); return result; } int32_t PPB_Instance_Proxy::RequestInputEvents(PP_Instance instance, uint32_t event_classes) { dispatcher()->Send(new PpapiHostMsg_PPBInstance_RequestInputEvents( - INTERFACE_ID_PPB_INSTANCE, instance, false, event_classes)); + API_ID_PPB_INSTANCE, instance, false, event_classes)); // We always register for the classes we can handle, this function validates // the flags so we can notify it if anything was invalid, without requiring @@ -273,7 +273,7 @@ int32_t PPB_Instance_Proxy::RequestFilteringInputEvents( PP_Instance instance, uint32_t event_classes) { dispatcher()->Send(new PpapiHostMsg_PPBInstance_RequestInputEvents( - INTERFACE_ID_PPB_INSTANCE, instance, true, event_classes)); + API_ID_PPB_INSTANCE, instance, true, event_classes)); // We always register for the classes we can handle, this function validates // the flags so we can notify it if anything was invalid, without requiring @@ -284,7 +284,7 @@ int32_t PPB_Instance_Proxy::RequestFilteringInputEvents( void PPB_Instance_Proxy::ClearInputEventRequest(PP_Instance instance, uint32_t event_classes) { dispatcher()->Send(new PpapiHostMsg_PPBInstance_ClearInputEvents( - INTERFACE_ID_PPB_INSTANCE, instance, event_classes)); + API_ID_PPB_INSTANCE, instance, event_classes)); } void PPB_Instance_Proxy::ZoomChanged(PP_Instance instance, @@ -306,7 +306,7 @@ PP_Var PPB_Instance_Proxy::ResolveRelativeToDocument( PP_URLComponents_Dev* components) { ReceiveSerializedVarReturnValue result; dispatcher()->Send(new PpapiHostMsg_PPBInstance_ResolveRelativeToDocument( - INTERFACE_ID_PPB_INSTANCE, instance, + API_ID_PPB_INSTANCE, instance, SerializedVarSendInput(dispatcher(), relative), &result)); return URLUtilImpl::ConvertComponentsAndReturnURL(result.Return(dispatcher()), @@ -317,7 +317,7 @@ PP_Bool PPB_Instance_Proxy::DocumentCanRequest(PP_Instance instance, PP_Var url) { PP_Bool result = PP_FALSE; dispatcher()->Send(new PpapiHostMsg_PPBInstance_DocumentCanRequest( - INTERFACE_ID_PPB_INSTANCE, instance, + API_ID_PPB_INSTANCE, instance, SerializedVarSendInput(dispatcher(), url), &result)); return result; @@ -327,7 +327,7 @@ PP_Bool PPB_Instance_Proxy::DocumentCanAccessDocument(PP_Instance instance, PP_Instance target) { PP_Bool result = PP_FALSE; dispatcher()->Send(new PpapiHostMsg_PPBInstance_DocumentCanAccessDocument( - INTERFACE_ID_PPB_INSTANCE, instance, target, &result)); + API_ID_PPB_INSTANCE, instance, target, &result)); return result; } @@ -335,7 +335,7 @@ PP_Var PPB_Instance_Proxy::GetDocumentURL(PP_Instance instance, PP_URLComponents_Dev* components) { ReceiveSerializedVarReturnValue result; dispatcher()->Send(new PpapiHostMsg_PPBInstance_GetDocumentURL( - INTERFACE_ID_PPB_INSTANCE, instance, &result)); + API_ID_PPB_INSTANCE, instance, &result)); return URLUtilImpl::ConvertComponentsAndReturnURL(result.Return(dispatcher()), components); } @@ -345,7 +345,7 @@ PP_Var PPB_Instance_Proxy::GetPluginInstanceURL( PP_URLComponents_Dev* components) { ReceiveSerializedVarReturnValue result; dispatcher()->Send(new PpapiHostMsg_PPBInstance_GetPluginInstanceURL( - INTERFACE_ID_PPB_INSTANCE, instance, &result)); + API_ID_PPB_INSTANCE, instance, &result)); return URLUtilImpl::ConvertComponentsAndReturnURL(result.Return(dispatcher()), components); } @@ -353,7 +353,7 @@ PP_Var PPB_Instance_Proxy::GetPluginInstanceURL( void PPB_Instance_Proxy::PostMessage(PP_Instance instance, PP_Var message) { dispatcher()->Send(new PpapiHostMsg_PPBInstance_PostMessage( - INTERFACE_ID_PPB_INSTANCE, + API_ID_PPB_INSTANCE, instance, SerializedVarSendInput(dispatcher(), message))); } @@ -363,13 +363,13 @@ int32_t PPB_Instance_Proxy::LockMouse(PP_Instance instance, return PP_ERROR_BADARGUMENT; dispatcher()->Send(new PpapiHostMsg_PPBInstance_LockMouse( - INTERFACE_ID_PPB_INSTANCE, instance, SendCallback(callback))); + API_ID_PPB_INSTANCE, instance, SendCallback(callback))); return PP_OK_COMPLETIONPENDING; } void PPB_Instance_Proxy::UnlockMouse(PP_Instance instance) { dispatcher()->Send(new PpapiHostMsg_PPBInstance_UnlockMouse( - INTERFACE_ID_PPB_INSTANCE, instance)); + API_ID_PPB_INSTANCE, instance)); } void PPB_Instance_Proxy::OnMsgGetWindowObject( diff --git a/ppapi/proxy/ppb_instance_proxy.h b/ppapi/proxy/ppb_instance_proxy.h index 3ba34c7..8197886 100644 --- a/ppapi/proxy/ppb_instance_proxy.h +++ b/ppapi/proxy/ppb_instance_proxy.h @@ -95,7 +95,7 @@ class PPB_Instance_Proxy : public InterfaceProxy, PP_CompletionCallback callback) OVERRIDE; virtual void UnlockMouse(PP_Instance instance) OVERRIDE; - static const InterfaceID kInterfaceID = INTERFACE_ID_PPB_INSTANCE; + static const ApiID kApiID = API_ID_PPB_INSTANCE; private: // Message handlers. diff --git a/ppapi/proxy/ppb_pdf_proxy.cc b/ppapi/proxy/ppb_pdf_proxy.cc index 874e487..7866e41 100644 --- a/ppapi/proxy/ppb_pdf_proxy.cc +++ b/ppapi/proxy/ppb_pdf_proxy.cc @@ -75,7 +75,7 @@ PP_Resource GetFontFileWithFallback( HostResource result; dispatcher->Send(new PpapiHostMsg_PPBPDF_GetFontFileWithFallback( - INTERFACE_ID_PPB_PDF, instance, desc, charset, &result)); + API_ID_PPB_PDF, instance, desc, charset, &result)); if (result.is_null()) return 0; return (new PrivateFontFile(result))->GetReference(); @@ -99,7 +99,7 @@ bool GetFontTableForPrivateFontFile(PP_Resource font_file, if (!contents) { std::string deserialized; dispatcher->Send(new PpapiHostMsg_PPBPDF_GetFontTableForPrivateFontFile( - INTERFACE_ID_PPB_PDF, object->host_resource(), table, &deserialized)); + API_ID_PPB_PDF, object->host_resource(), table, &deserialized)); if (deserialized.empty()) return false; contents = object->AddFontTable(table, deserialized); @@ -141,7 +141,7 @@ const InterfaceProxy::Info* PPB_PDF_Proxy::GetInfo() { static const Info info = { &pdf_interface, PPB_PDF_INTERFACE, - INTERFACE_ID_PPB_PDF, + API_ID_PPB_PDF, true, &CreatePDFProxy, }; diff --git a/ppapi/proxy/ppb_surface_3d_proxy.cc b/ppapi/proxy/ppb_surface_3d_proxy.cc index c46f01b..b61ae6c 100644 --- a/ppapi/proxy/ppb_surface_3d_proxy.cc +++ b/ppapi/proxy/ppb_surface_3d_proxy.cc @@ -73,7 +73,7 @@ int32_t Surface3D::SwapBuffers(PP_CompletionCallback callback) { current_flush_callback_ = callback; IPC::Message* msg = new PpapiHostMsg_PPBSurface3D_SwapBuffers( - INTERFACE_ID_PPB_SURFACE_3D, host_resource()); + API_ID_PPB_SURFACE_3D, host_resource()); msg->set_unblock(true); PluginDispatcher::GetForResource(this)->Send(msg); @@ -100,7 +100,7 @@ const InterfaceProxy::Info* PPB_Surface3D_Proxy::GetInfo() { static const Info info = { thunk::GetPPB_Surface3D_Dev_Thunk(), PPB_SURFACE_3D_DEV_INTERFACE, - INTERFACE_ID_PPB_SURFACE_3D, + API_ID_PPB_SURFACE_3D, false, &CreateSurface3DProxy, }; @@ -128,7 +128,7 @@ PP_Resource PPB_Surface3D_Proxy::CreateProxyResource( HostResource result; dispatcher->Send(new PpapiHostMsg_PPBSurface3D_Create( - INTERFACE_ID_PPB_SURFACE_3D, instance, config, attribs, &result)); + API_ID_PPB_SURFACE_3D, instance, config, attribs, &result)); if (result.is_null()) return 0; @@ -187,7 +187,7 @@ void PPB_Surface3D_Proxy::SendSwapBuffersACKToPlugin( int32_t result, const HostResource& surface_3d) { dispatcher()->Send(new PpapiMsg_PPBSurface3D_SwapBuffersACK( - INTERFACE_ID_PPB_SURFACE_3D, surface_3d, result)); + API_ID_PPB_SURFACE_3D, surface_3d, result)); } } // namespace proxy diff --git a/ppapi/proxy/ppb_surface_3d_proxy.h b/ppapi/proxy/ppb_surface_3d_proxy.h index be8ce34..cf47888 100644 --- a/ppapi/proxy/ppb_surface_3d_proxy.h +++ b/ppapi/proxy/ppb_surface_3d_proxy.h @@ -75,7 +75,7 @@ class PPB_Surface3D_Proxy : public InterfaceProxy { // InterfaceProxy implementation. virtual bool OnMessageReceived(const IPC::Message& msg); - static const InterfaceID kInterfaceID = INTERFACE_ID_PPB_SURFACE_3D; + static const ApiID kApiID = API_ID_PPB_SURFACE_3D; private: // Message handlers. diff --git a/ppapi/proxy/ppb_testing_proxy.cc b/ppapi/proxy/ppb_testing_proxy.cc index 470d3da..73f9b5b 100644 --- a/ppapi/proxy/ppb_testing_proxy.cc +++ b/ppapi/proxy/ppb_testing_proxy.cc @@ -37,7 +37,7 @@ PP_Bool ReadImageData(PP_Resource graphics_2d, PP_Bool result = PP_FALSE; dispatcher->Send(new PpapiHostMsg_PPBTesting_ReadImageData( - INTERFACE_ID_PPB_TESTING, graphics_2d_object->host_resource(), + API_ID_PPB_TESTING, graphics_2d_object->host_resource(), image_object->host_resource(), *top_left, &result)); return result; } @@ -60,7 +60,7 @@ uint32_t GetLiveObjectsForInstance(PP_Instance instance_id) { uint32_t result = 0; dispatcher->Send(new PpapiHostMsg_PPBTesting_GetLiveObjectsForInstance( - INTERFACE_ID_PPB_TESTING, instance_id, &result)); + API_ID_PPB_TESTING, instance_id, &result)); return result; } @@ -99,7 +99,7 @@ const InterfaceProxy::Info* PPB_Testing_Proxy::GetInfo() { static const Info info = { &testing_interface, PPB_TESTING_DEV_INTERFACE, - INTERFACE_ID_PPB_TESTING, + API_ID_PPB_TESTING, false, &CreateTestingProxy, }; diff --git a/ppapi/proxy/ppb_text_input_proxy.cc b/ppapi/proxy/ppb_text_input_proxy.cc index e4ada9b..7a48912 100644 --- a/ppapi/proxy/ppb_text_input_proxy.cc +++ b/ppapi/proxy/ppb_text_input_proxy.cc @@ -27,19 +27,19 @@ PPB_TextInput_Proxy::AsPPB_TextInput_FunctionAPI() { void PPB_TextInput_Proxy::SetTextInputType(PP_Instance instance, PP_TextInput_Type type) { dispatcher()->Send(new PpapiHostMsg_PPBTextInput_SetTextInputType( - INTERFACE_ID_PPB_TEXT_INPUT, instance, type)); + API_ID_PPB_TEXT_INPUT, instance, type)); } void PPB_TextInput_Proxy::UpdateCaretPosition(PP_Instance instance, const PP_Rect& caret, const PP_Rect& bounding_box) { dispatcher()->Send(new PpapiHostMsg_PPBTextInput_UpdateCaretPosition( - INTERFACE_ID_PPB_TEXT_INPUT, instance, caret, bounding_box)); + API_ID_PPB_TEXT_INPUT, instance, caret, bounding_box)); } void PPB_TextInput_Proxy::CancelCompositionText(PP_Instance instance) { dispatcher()->Send(new PpapiHostMsg_PPBTextInput_CancelCompositionText( - INTERFACE_ID_PPB_TEXT_INPUT, instance)); + API_ID_PPB_TEXT_INPUT, instance)); } bool PPB_TextInput_Proxy::OnMessageReceived(const IPC::Message& msg) { diff --git a/ppapi/proxy/ppb_text_input_proxy.h b/ppapi/proxy/ppb_text_input_proxy.h index e234f33..d692ea3 100644 --- a/ppapi/proxy/ppb_text_input_proxy.h +++ b/ppapi/proxy/ppb_text_input_proxy.h @@ -37,7 +37,7 @@ class PPB_TextInput_Proxy // InterfaceProxy implementation. virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; - static const InterfaceID kInterfaceID = INTERFACE_ID_PPB_TEXT_INPUT; + static const ApiID kApiID = API_ID_PPB_TEXT_INPUT; private: // Message handlers. diff --git a/ppapi/proxy/ppb_url_loader_proxy.cc b/ppapi/proxy/ppb_url_loader_proxy.cc index 2ad3025..6fb43bd 100644 --- a/ppapi/proxy/ppb_url_loader_proxy.cc +++ b/ppapi/proxy/ppb_url_loader_proxy.cc @@ -68,7 +68,7 @@ void UpdateResourceLoadStatus(PP_Instance pp_instance, params.bytes_received = bytes_received; params.total_bytes_to_be_received = total_bytes_to_be_received; dispatcher->Send(new PpapiMsg_PPBURLLoader_UpdateProgress( - INTERFACE_ID_PPB_URL_LOADER, params)); + API_ID_PPB_URL_LOADER, params)); } InterfaceProxy* CreateURLLoaderProxy(Dispatcher* dispatcher) { @@ -188,7 +188,7 @@ int32_t URLLoader::Open(PP_Resource request_id, // TODO(brettw) http://crbug.com/86279: SendCallback doesn't ensure that // the proper callback semantics happen if the object is deleted. GetDispatcher()->Send(new PpapiHostMsg_PPBURLLoader_Open( - INTERFACE_ID_PPB_URL_LOADER, host_resource(), enter.object()->GetData(), + API_ID_PPB_URL_LOADER, host_resource(), enter.object()->GetData(), GetDispatcher()->callback_tracker().SendCallback(callback))); return PP_OK_COMPLETIONPENDING; } @@ -197,7 +197,7 @@ int32_t URLLoader::FollowRedirect(PP_CompletionCallback callback) { // TODO(brettw) http://crbug.com/86279: SendCallback doesn't ensure that // the proper callback semantics happen if the object is deleted. GetDispatcher()->Send(new PpapiHostMsg_PPBURLLoader_FollowRedirect( - INTERFACE_ID_PPB_URL_LOADER, host_resource(), + API_ID_PPB_URL_LOADER, host_resource(), GetDispatcher()->callback_tracker().SendCallback(callback))); return PP_OK_COMPLETIONPENDING; } @@ -231,7 +231,7 @@ PP_Resource URLLoader::GetResponseInfo() { if (!response_info_) { HostResource response_id; GetDispatcher()->Send(new PpapiHostMsg_PPBURLLoader_GetResponseInfo( - INTERFACE_ID_PPB_URL_LOADER, host_resource(), &response_id)); + API_ID_PPB_URL_LOADER, host_resource(), &response_id)); if (response_id.is_null()) return 0; @@ -269,26 +269,26 @@ int32_t URLLoader::ReadResponseBody(void* buffer, current_read_buffer_size_ = bytes_to_read; GetDispatcher()->Send(new PpapiHostMsg_PPBURLLoader_ReadResponseBody( - INTERFACE_ID_PPB_URL_LOADER, host_resource(), bytes_to_read)); + API_ID_PPB_URL_LOADER, host_resource(), bytes_to_read)); return PP_OK_COMPLETIONPENDING; } int32_t URLLoader::FinishStreamingToFile(PP_CompletionCallback callback) { GetDispatcher()->Send(new PpapiHostMsg_PPBURLLoader_FinishStreamingToFile( - INTERFACE_ID_PPB_URL_LOADER, host_resource(), + API_ID_PPB_URL_LOADER, host_resource(), GetDispatcher()->callback_tracker().SendCallback(callback))); return PP_OK_COMPLETIONPENDING; } void URLLoader::Close() { GetDispatcher()->Send(new PpapiHostMsg_PPBURLLoader_Close( - INTERFACE_ID_PPB_URL_LOADER, host_resource())); + API_ID_PPB_URL_LOADER, host_resource())); } void URLLoader::GrantUniversalAccess() { GetDispatcher()->Send( new PpapiHostMsg_PPBURLLoader_GrantUniversalAccess( - INTERFACE_ID_PPB_URL_LOADER, host_resource())); + API_ID_PPB_URL_LOADER, host_resource())); } void URLLoader::SetStatusCallback( @@ -366,7 +366,7 @@ const InterfaceProxy::Info* PPB_URLLoader_Proxy::GetTrustedInfo() { static const Info info = { thunk::GetPPB_URLLoaderTrusted_Thunk(), PPB_URLLOADERTRUSTED_INTERFACE, - INTERFACE_ID_NONE, // URL_LOADER is the canonical one. + API_ID_NONE, // URL_LOADER is the canonical one. false, &CreateURLLoaderProxy }; @@ -381,7 +381,7 @@ PP_Resource PPB_URLLoader_Proxy::CreateProxyResource(PP_Instance pp_instance) { HostResource result; dispatcher->Send(new PpapiHostMsg_PPBURLLoader_Create( - INTERFACE_ID_PPB_URL_LOADER, pp_instance, &result)); + API_ID_PPB_URL_LOADER, pp_instance, &result)); if (result.is_null()) return 0; return PPB_URLLoader_Proxy::TrackPluginResource(result); @@ -574,7 +574,7 @@ void PPB_URLLoader_Proxy::OnReadCallback(int32_t result, info->read_buffer.resize(bytes_read); dispatcher()->Send(new PpapiMsg_PPBURLLoader_ReadResponseBody_Ack( - INTERFACE_ID_PPB_URL_LOADER, info->resource, result, info->read_buffer)); + API_ID_PPB_URL_LOADER, info->resource, result, info->read_buffer)); delete info; } diff --git a/ppapi/proxy/ppb_url_loader_proxy.h b/ppapi/proxy/ppb_url_loader_proxy.h index defae9b..855a965 100644 --- a/ppapi/proxy/ppb_url_loader_proxy.h +++ b/ppapi/proxy/ppb_url_loader_proxy.h @@ -52,7 +52,7 @@ class PPB_URLLoader_Proxy : public InterfaceProxy { // time you're sending a new URLLoader that the plugin hasn't seen yet. void PrepareURLLoaderForSendingToPlugin(PP_Resource resource); - static const InterfaceID kInterfaceID = INTERFACE_ID_PPB_URL_LOADER; + static const ApiID kApiID = API_ID_PPB_URL_LOADER; private: // Data associated with callbacks for ReadResponseBody. diff --git a/ppapi/proxy/ppb_url_response_info_proxy.cc b/ppapi/proxy/ppb_url_response_info_proxy.cc index ace317c..c9da1ef7 100644 --- a/ppapi/proxy/ppb_url_response_info_proxy.cc +++ b/ppapi/proxy/ppb_url_response_info_proxy.cc @@ -53,7 +53,7 @@ PP_Var URLResponseInfo::GetProperty(PP_URLResponseProperty property) { PluginDispatcher* dispatcher = PluginDispatcher::GetForResource(this); ReceiveSerializedVarReturnValue result; dispatcher->Send(new PpapiHostMsg_PPBURLResponseInfo_GetProperty( - INTERFACE_ID_PPB_URL_RESPONSE_INFO, host_resource(), property, &result)); + API_ID_PPB_URL_RESPONSE_INFO, host_resource(), property, &result)); return result.Return(dispatcher); } @@ -65,7 +65,7 @@ PP_Resource URLResponseInfo::GetBodyAsFileRef() { PPB_FileRef_CreateInfo create_info; PluginDispatcher::GetForResource(this)->Send( new PpapiHostMsg_PPBURLResponseInfo_GetBodyAsFileRef( - INTERFACE_ID_PPB_URL_RESPONSE_INFO, host_resource(), &create_info)); + API_ID_PPB_URL_RESPONSE_INFO, host_resource(), &create_info)); return PPB_FileRef_Proxy::DeserializeFileRef(create_info); } @@ -120,7 +120,7 @@ void PPB_URLResponseInfo_Proxy::OnMsgGetBodyAsFileRef( // Use the FileRef proxy to serialize. PPB_FileRef_Proxy* file_ref_proxy = static_cast<PPB_FileRef_Proxy*>( - dispatcher()->GetInterfaceProxy(INTERFACE_ID_PPB_FILE_REF)); + dispatcher()->GetInterfaceProxy(API_ID_PPB_FILE_REF)); file_ref_proxy->SerializeFileRef(file_ref, result); } diff --git a/ppapi/proxy/ppb_url_response_info_proxy.h b/ppapi/proxy/ppb_url_response_info_proxy.h index 8f97a53..2351715 100644 --- a/ppapi/proxy/ppb_url_response_info_proxy.h +++ b/ppapi/proxy/ppb_url_response_info_proxy.h @@ -38,7 +38,7 @@ class PPB_URLResponseInfo_Proxy : public InterfaceProxy { // InterfaceProxy implementation. virtual bool OnMessageReceived(const IPC::Message& msg); - static const InterfaceID kInterfaceID = INTERFACE_ID_PPB_URL_RESPONSE_INFO; + static const ApiID kApiID = API_ID_PPB_URL_RESPONSE_INFO; private: // Message handlers. diff --git a/ppapi/proxy/ppb_var_deprecated_proxy.cc b/ppapi/proxy/ppb_var_deprecated_proxy.cc index 892fba1..9fd3a6c 100644 --- a/ppapi/proxy/ppb_var_deprecated_proxy.cc +++ b/ppapi/proxy/ppb_var_deprecated_proxy.cc @@ -93,7 +93,7 @@ bool HasProperty(PP_Var var, PP_Bool result = PP_FALSE; if (!se.IsThrown()) { dispatcher->Send(new PpapiHostMsg_PPBVar_HasProperty( - INTERFACE_ID_PPB_VAR_DEPRECATED, + API_ID_PPB_VAR_DEPRECATED, SerializedVarSendInput(dispatcher, var), SerializedVarSendInput(dispatcher, name), &se, &result)); } @@ -111,7 +111,7 @@ bool HasMethod(PP_Var var, PP_Bool result = PP_FALSE; if (!se.IsThrown()) { dispatcher->Send(new PpapiHostMsg_PPBVar_HasMethodDeprecated( - INTERFACE_ID_PPB_VAR_DEPRECATED, + API_ID_PPB_VAR_DEPRECATED, SerializedVarSendInput(dispatcher, var), SerializedVarSendInput(dispatcher, name), &se, &result)); } @@ -129,7 +129,7 @@ PP_Var GetProperty(PP_Var var, ReceiveSerializedVarReturnValue result; if (!se.IsThrown()) { dispatcher->Send(new PpapiHostMsg_PPBVar_GetProperty( - INTERFACE_ID_PPB_VAR_DEPRECATED, + API_ID_PPB_VAR_DEPRECATED, SerializedVarSendInput(dispatcher, var), SerializedVarSendInput(dispatcher, name), &se, &result)); } @@ -152,7 +152,7 @@ void EnumerateProperties(PP_Var var, ReceiveSerializedException se(dispatcher, exception); if (!se.IsThrown()) { dispatcher->Send(new PpapiHostMsg_PPBVar_EnumerateProperties( - INTERFACE_ID_PPB_VAR_DEPRECATED, + API_ID_PPB_VAR_DEPRECATED, SerializedVarSendInput(dispatcher, var), out_vector.OutParam(), &se)); } @@ -169,7 +169,7 @@ void SetProperty(PP_Var var, ReceiveSerializedException se(dispatcher, exception); if (!se.IsThrown()) { dispatcher->Send(new PpapiHostMsg_PPBVar_SetPropertyDeprecated( - INTERFACE_ID_PPB_VAR_DEPRECATED, + API_ID_PPB_VAR_DEPRECATED, SerializedVarSendInput(dispatcher, var), SerializedVarSendInput(dispatcher, name), SerializedVarSendInput(dispatcher, value), &se)); @@ -187,7 +187,7 @@ void RemoveProperty(PP_Var var, PP_Bool result = PP_FALSE; if (!se.IsThrown()) { dispatcher->Send(new PpapiHostMsg_PPBVar_DeleteProperty( - INTERFACE_ID_PPB_VAR_DEPRECATED, + API_ID_PPB_VAR_DEPRECATED, SerializedVarSendInput(dispatcher, var), SerializedVarSendInput(dispatcher, name), &se, &result)); } @@ -209,7 +209,7 @@ PP_Var Call(PP_Var object, SerializedVarSendInput::ConvertVector(dispatcher, argv, argc, &argv_vect); dispatcher->Send(new PpapiHostMsg_PPBVar_CallDeprecated( - INTERFACE_ID_PPB_VAR_DEPRECATED, + API_ID_PPB_VAR_DEPRECATED, SerializedVarSendInput(dispatcher, object), SerializedVarSendInput(dispatcher, method_name), argv_vect, &se, &result)); @@ -232,7 +232,7 @@ PP_Var Construct(PP_Var object, SerializedVarSendInput::ConvertVector(dispatcher, argv, argc, &argv_vect); dispatcher->Send(new PpapiHostMsg_PPBVar_Construct( - INTERFACE_ID_PPB_VAR_DEPRECATED, + API_ID_PPB_VAR_DEPRECATED, SerializedVarSendInput(dispatcher, object), argv_vect, &se, &result)); } @@ -250,7 +250,7 @@ bool IsInstanceOf(PP_Var var, int64 class_int = static_cast<int64>(reinterpret_cast<intptr_t>(ppp_class)); int64 class_data_int = 0; dispatcher->Send(new PpapiHostMsg_PPBVar_IsInstanceOfDeprecated( - INTERFACE_ID_PPB_VAR_DEPRECATED, SerializedVarSendInput(dispatcher, var), + API_ID_PPB_VAR_DEPRECATED, SerializedVarSendInput(dispatcher, var), class_int, &class_data_int, &result)); *ppp_class_data = reinterpret_cast<void*>(static_cast<intptr_t>(class_data_int)); @@ -269,7 +269,7 @@ PP_Var CreateObject(PP_Instance instance, int64 data_int = static_cast<int64>(reinterpret_cast<intptr_t>(ppp_class_data)); dispatcher->Send(new PpapiHostMsg_PPBVar_CreateObjectDeprecated( - INTERFACE_ID_PPB_VAR_DEPRECATED, instance, class_int, data_int, + API_ID_PPB_VAR_DEPRECATED, instance, class_int, data_int, &result)); return result.Return(dispatcher); } @@ -316,7 +316,7 @@ const InterfaceProxy::Info* PPB_Var_Deprecated_Proxy::GetInfo() { static const Info info = { &var_deprecated_interface, PPB_VAR_DEPRECATED_INTERFACE, - INTERFACE_ID_PPB_VAR_DEPRECATED, + API_ID_PPB_VAR_DEPRECATED, false, &CreateVarDeprecatedProxy, }; diff --git a/ppapi/proxy/ppb_video_capture_proxy.cc b/ppapi/proxy/ppb_video_capture_proxy.cc index c771bf5..3df4de8 100644 --- a/ppapi/proxy/ppb_video_capture_proxy.cc +++ b/ppapi/proxy/ppb_video_capture_proxy.cc @@ -87,7 +87,7 @@ void OnDeviceInfo(PP_Instance instance, } } dispatcher->Send(new PpapiMsg_PPPVideoCapture_OnDeviceInfo( - INTERFACE_ID_PPP_VIDEO_CAPTURE_DEV, host_resource, *info, buffers)); + API_ID_PPP_VIDEO_CAPTURE_DEV, host_resource, *info, buffers)); } void OnStatus(PP_Instance instance, PP_Resource resource, uint32_t status) { @@ -99,7 +99,7 @@ void OnStatus(PP_Instance instance, PP_Resource resource, uint32_t status) { HostResource host_resource; host_resource.SetHostResource(instance, resource); dispatcher->Send(new PpapiMsg_PPPVideoCapture_OnStatus( - INTERFACE_ID_PPP_VIDEO_CAPTURE_DEV, host_resource, status)); + API_ID_PPP_VIDEO_CAPTURE_DEV, host_resource, status)); } void OnError(PP_Instance instance, PP_Resource resource, uint32_t error_code) { @@ -111,7 +111,7 @@ void OnError(PP_Instance instance, PP_Resource resource, uint32_t error_code) { HostResource host_resource; host_resource.SetHostResource(instance, resource); dispatcher->Send(new PpapiMsg_PPPVideoCapture_OnError( - INTERFACE_ID_PPP_VIDEO_CAPTURE_DEV, host_resource, error_code)); + API_ID_PPP_VIDEO_CAPTURE_DEV, host_resource, error_code)); } void OnBufferReady(PP_Instance instance, @@ -125,7 +125,7 @@ void OnBufferReady(PP_Instance instance, HostResource host_resource; host_resource.SetHostResource(instance, resource); dispatcher->Send(new PpapiMsg_PPPVideoCapture_OnBufferReady( - INTERFACE_ID_PPP_VIDEO_CAPTURE_DEV, host_resource, buffer)); + API_ID_PPP_VIDEO_CAPTURE_DEV, host_resource, buffer)); } PPP_VideoCapture_Dev ppp_video_capture = { @@ -162,7 +162,7 @@ class VideoCapture : public ppapi::thunk::PPB_VideoCapture_API, } status_ = PP_VIDEO_CAPTURE_STATUS_STARTING; GetDispatcher()->Send(new PpapiHostMsg_PPBVideoCapture_StartCapture( - INTERFACE_ID_PPB_VIDEO_CAPTURE_DEV, host_resource(), + API_ID_PPB_VIDEO_CAPTURE_DEV, host_resource(), requested_info, buffer_count)); return PP_OK; } @@ -171,7 +171,7 @@ class VideoCapture : public ppapi::thunk::PPB_VideoCapture_API, if (buffer >= buffer_in_use_.size() || !buffer_in_use_[buffer]) return PP_ERROR_BADARGUMENT; GetDispatcher()->Send(new PpapiHostMsg_PPBVideoCapture_ReuseBuffer( - INTERFACE_ID_PPB_VIDEO_CAPTURE_DEV, host_resource(), buffer)); + API_ID_PPB_VIDEO_CAPTURE_DEV, host_resource(), buffer)); return PP_OK; } @@ -189,7 +189,7 @@ class VideoCapture : public ppapi::thunk::PPB_VideoCapture_API, buffer_in_use_.clear(); status_ = PP_VIDEO_CAPTURE_STATUS_STOPPING; GetDispatcher()->Send(new PpapiHostMsg_PPBVideoCapture_StopCapture( - INTERFACE_ID_PPB_VIDEO_CAPTURE_DEV, host_resource())); + API_ID_PPB_VIDEO_CAPTURE_DEV, host_resource())); return PP_OK; } @@ -275,7 +275,7 @@ PP_Resource PPB_VideoCapture_Proxy::CreateProxyResource(PP_Instance instance) { HostResource result; dispatcher->Send(new PpapiHostMsg_PPBVideoCapture_Create( - INTERFACE_ID_PPB_VIDEO_CAPTURE_DEV, instance, &result)); + API_ID_PPB_VIDEO_CAPTURE_DEV, instance, &result)); if (result.is_null()) return 0; return (new VideoCapture(result))->GetReference(); @@ -346,7 +346,7 @@ const InterfaceProxy::Info* PPP_VideoCapture_Proxy::GetInfo() { static const Info info = { &ppp_video_capture, PPP_VIDEO_CAPTURE_DEV_INTERFACE, - INTERFACE_ID_PPP_VIDEO_CAPTURE_DEV, + API_ID_PPP_VIDEO_CAPTURE_DEV, false, &CreatePPPVideoCaptureProxy, }; diff --git a/ppapi/proxy/ppb_video_capture_proxy.h b/ppapi/proxy/ppb_video_capture_proxy.h index 5695579..e72899a 100644 --- a/ppapi/proxy/ppb_video_capture_proxy.h +++ b/ppapi/proxy/ppb_video_capture_proxy.h @@ -29,7 +29,7 @@ class PPB_VideoCapture_Proxy : public InterfaceProxy { // InterfaceProxy implementation. virtual bool OnMessageReceived(const IPC::Message& msg); - static const InterfaceID kInterfaceID = INTERFACE_ID_PPB_VIDEO_CAPTURE_DEV; + static const ApiID kApiID = API_ID_PPB_VIDEO_CAPTURE_DEV; private: // Message handlers. @@ -54,7 +54,7 @@ class PPP_VideoCapture_Proxy : public InterfaceProxy { // InterfaceProxy implementation. virtual bool OnMessageReceived(const IPC::Message& msg); - static const InterfaceID kInterfaceID = INTERFACE_ID_PPP_VIDEO_CAPTURE_DEV; + static const ApiID kApiID = API_ID_PPP_VIDEO_CAPTURE_DEV; private: // Message handlers. diff --git a/ppapi/proxy/ppb_video_decoder_proxy.cc b/ppapi/proxy/ppb_video_decoder_proxy.cc index 023b8c9..8446ca5 100644 --- a/ppapi/proxy/ppb_video_decoder_proxy.cc +++ b/ppapi/proxy/ppb_video_decoder_proxy.cc @@ -88,7 +88,7 @@ int32_t VideoDecoder::Decode( FlushCommandBuffer(); GetDispatcher()->Send(new PpapiHostMsg_PPBVideoDecoder_Decode( - INTERFACE_ID_PPB_VIDEO_DECODER_DEV, host_resource(), + API_ID_PPB_VIDEO_DECODER_DEV, host_resource(), host_buffer, bitstream_buffer->id, bitstream_buffer->size)); return PP_OK_COMPLETIONPENDING; @@ -101,13 +101,13 @@ void VideoDecoder::AssignPictureBuffers(uint32_t no_of_buffers, FlushCommandBuffer(); GetDispatcher()->Send( new PpapiHostMsg_PPBVideoDecoder_AssignPictureBuffers( - INTERFACE_ID_PPB_VIDEO_DECODER_DEV, host_resource(), buffer_list)); + API_ID_PPB_VIDEO_DECODER_DEV, host_resource(), buffer_list)); } void VideoDecoder::ReusePictureBuffer(int32_t picture_buffer_id) { FlushCommandBuffer(); GetDispatcher()->Send(new PpapiHostMsg_PPBVideoDecoder_ReusePictureBuffer( - INTERFACE_ID_PPB_VIDEO_DECODER_DEV, host_resource(), picture_buffer_id)); + API_ID_PPB_VIDEO_DECODER_DEV, host_resource(), picture_buffer_id)); } int32_t VideoDecoder::Flush(PP_CompletionCallback callback) { @@ -116,7 +116,7 @@ int32_t VideoDecoder::Flush(PP_CompletionCallback callback) { FlushCommandBuffer(); GetDispatcher()->Send(new PpapiHostMsg_PPBVideoDecoder_Flush( - INTERFACE_ID_PPB_VIDEO_DECODER_DEV, host_resource())); + API_ID_PPB_VIDEO_DECODER_DEV, host_resource())); return PP_OK_COMPLETIONPENDING; } @@ -126,14 +126,14 @@ int32_t VideoDecoder::Reset(PP_CompletionCallback callback) { FlushCommandBuffer(); GetDispatcher()->Send(new PpapiHostMsg_PPBVideoDecoder_Reset( - INTERFACE_ID_PPB_VIDEO_DECODER_DEV, host_resource())); + API_ID_PPB_VIDEO_DECODER_DEV, host_resource())); return PP_OK_COMPLETIONPENDING; } void VideoDecoder::Destroy() { FlushCommandBuffer(); GetDispatcher()->Send(new PpapiHostMsg_PPBVideoDecoder_Destroy( - INTERFACE_ID_PPB_VIDEO_DECODER_DEV, host_resource())); + API_ID_PPB_VIDEO_DECODER_DEV, host_resource())); VideoDecoderImpl::Destroy(); } @@ -215,7 +215,7 @@ PP_Resource PPB_VideoDecoder_Proxy::CreateProxyResource( HostResource result; dispatcher->Send(new PpapiHostMsg_PPBVideoDecoder_Create( - INTERFACE_ID_PPB_VIDEO_DECODER_DEV, instance, + API_ID_PPB_VIDEO_DECODER_DEV, instance, host_context, profile, &result)); if (result.is_null()) return 0; @@ -294,19 +294,19 @@ void PPB_VideoDecoder_Proxy::OnMsgDestroy(const HostResource& decoder) { void PPB_VideoDecoder_Proxy::SendMsgEndOfBitstreamACKToPlugin( int32_t result, const HostResource& decoder, int32 id) { dispatcher()->Send(new PpapiMsg_PPBVideoDecoder_EndOfBitstreamACK( - INTERFACE_ID_PPB_VIDEO_DECODER_DEV, decoder, id, result)); + API_ID_PPB_VIDEO_DECODER_DEV, decoder, id, result)); } void PPB_VideoDecoder_Proxy::SendMsgFlushACKToPlugin( int32_t result, const HostResource& decoder) { dispatcher()->Send(new PpapiMsg_PPBVideoDecoder_FlushACK( - INTERFACE_ID_PPB_VIDEO_DECODER_DEV, decoder, result)); + API_ID_PPB_VIDEO_DECODER_DEV, decoder, result)); } void PPB_VideoDecoder_Proxy::SendMsgResetACKToPlugin( int32_t result, const HostResource& decoder) { dispatcher()->Send(new PpapiMsg_PPBVideoDecoder_ResetACK( - INTERFACE_ID_PPB_VIDEO_DECODER_DEV, decoder, result)); + API_ID_PPB_VIDEO_DECODER_DEV, decoder, result)); } void PPB_VideoDecoder_Proxy::OnMsgEndOfBitstreamACK( diff --git a/ppapi/proxy/ppb_video_decoder_proxy.h b/ppapi/proxy/ppb_video_decoder_proxy.h index 32d1ec6..edebb0e 100644 --- a/ppapi/proxy/ppb_video_decoder_proxy.h +++ b/ppapi/proxy/ppb_video_decoder_proxy.h @@ -29,7 +29,7 @@ class PPB_VideoDecoder_Proxy : public InterfaceProxy { // InterfaceProxy implementation. virtual bool OnMessageReceived(const IPC::Message& msg); - static const InterfaceID kInterfaceID = INTERFACE_ID_PPB_VIDEO_DECODER_DEV; + static const ApiID kApiID = API_ID_PPB_VIDEO_DECODER_DEV; private: // Message handlers in the renderer process to receive messages from the diff --git a/ppapi/proxy/ppp_class_proxy.cc b/ppapi/proxy/ppp_class_proxy.cc index 9a616f42..a26bd81 100644 --- a/ppapi/proxy/ppp_class_proxy.cc +++ b/ppapi/proxy/ppp_class_proxy.cc @@ -7,9 +7,9 @@ #include "ppapi/c/dev/ppb_var_deprecated.h" #include "ppapi/c/dev/ppp_class_deprecated.h" #include "ppapi/proxy/dispatcher.h" -#include "ppapi/proxy/interface_id.h" #include "ppapi/proxy/ppapi_messages.h" #include "ppapi/proxy/serialized_var.h" +#include "ppapi/shared_impl/api_id.h" namespace ppapi { namespace proxy { @@ -41,7 +41,7 @@ bool HasProperty(void* object, PP_Var name, PP_Var* exception) { bool result = false; ReceiveSerializedException se(obj->dispatcher, exception); obj->dispatcher->Send(new PpapiMsg_PPPClass_HasProperty( - INTERFACE_ID_PPP_CLASS, obj->ppp_class, obj->user_data, + API_ID_PPP_CLASS, obj->ppp_class, obj->user_data, SerializedVarSendInput(obj->dispatcher, name), &se, &result)); return result; } @@ -51,7 +51,7 @@ bool HasMethod(void* object, PP_Var name, PP_Var* exception) { bool result = false; ReceiveSerializedException se(obj->dispatcher, exception); obj->dispatcher->Send(new PpapiMsg_PPPClass_HasMethod( - INTERFACE_ID_PPP_CLASS, obj->ppp_class, obj->user_data, + API_ID_PPP_CLASS, obj->ppp_class, obj->user_data, SerializedVarSendInput(obj->dispatcher, name), &se, &result)); return result; } @@ -63,7 +63,7 @@ PP_Var GetProperty(void* object, ReceiveSerializedException se(obj->dispatcher, exception); ReceiveSerializedVarReturnValue result; obj->dispatcher->Send(new PpapiMsg_PPPClass_GetProperty( - INTERFACE_ID_PPP_CLASS, obj->ppp_class, obj->user_data, + API_ID_PPP_CLASS, obj->ppp_class, obj->user_data, SerializedVarSendInput(obj->dispatcher, name), &se, &result)); return result.Return(obj->dispatcher); } @@ -83,7 +83,7 @@ void SetProperty(void* object, ObjectProxy* obj = ToObjectProxy(object); ReceiveSerializedException se(obj->dispatcher, exception); obj->dispatcher->Send(new PpapiMsg_PPPClass_SetProperty( - INTERFACE_ID_PPP_CLASS, obj->ppp_class, obj->user_data, + API_ID_PPP_CLASS, obj->ppp_class, obj->user_data, SerializedVarSendInput(obj->dispatcher, name), SerializedVarSendInput(obj->dispatcher, value), &se)); } @@ -94,7 +94,7 @@ void RemoveProperty(void* object, ObjectProxy* obj = ToObjectProxy(object); ReceiveSerializedException se(obj->dispatcher, exception); obj->dispatcher->Send(new PpapiMsg_PPPClass_RemoveProperty( - INTERFACE_ID_PPP_CLASS, obj->ppp_class, obj->user_data, + API_ID_PPP_CLASS, obj->ppp_class, obj->user_data, SerializedVarSendInput(obj->dispatcher, name), &se)); } @@ -112,7 +112,7 @@ PP_Var Call(void* object, &argv_vect); obj->dispatcher->Send(new PpapiMsg_PPPClass_Call( - INTERFACE_ID_PPP_CLASS, obj->ppp_class, obj->user_data, + API_ID_PPP_CLASS, obj->ppp_class, obj->user_data, SerializedVarSendInput(obj->dispatcher, method_name), argv_vect, &se, &result)); return result.Return(obj->dispatcher); @@ -131,7 +131,7 @@ PP_Var Construct(void* object, &argv_vect); obj->dispatcher->Send(new PpapiMsg_PPPClass_Construct( - INTERFACE_ID_PPP_CLASS, + API_ID_PPP_CLASS, obj->ppp_class, obj->user_data, argv_vect, &se, &result)); return result.Return(obj->dispatcher); } @@ -139,7 +139,7 @@ PP_Var Construct(void* object, void Deallocate(void* object) { ObjectProxy* obj = ToObjectProxy(object); obj->dispatcher->Send(new PpapiMsg_PPPClass_Deallocate( - INTERFACE_ID_PPP_CLASS, obj->ppp_class, obj->user_data)); + API_ID_PPP_CLASS, obj->ppp_class, obj->user_data)); delete obj; } diff --git a/ppapi/proxy/ppp_graphics_3d_proxy.cc b/ppapi/proxy/ppp_graphics_3d_proxy.cc index 3cac4646..d83aa80 100644 --- a/ppapi/proxy/ppp_graphics_3d_proxy.cc +++ b/ppapi/proxy/ppp_graphics_3d_proxy.cc @@ -16,8 +16,7 @@ namespace { void ContextLost(PP_Instance instance) { HostDispatcher::GetForInstance(instance)->Send( - new PpapiMsg_PPPGraphics3D_ContextLost(INTERFACE_ID_PPP_GRAPHICS_3D, - instance)); + new PpapiMsg_PPPGraphics3D_ContextLost(API_ID_PPP_GRAPHICS_3D, instance)); } static const PPP_Graphics3D graphics_3d_interface = { @@ -47,7 +46,7 @@ const InterfaceProxy::Info* PPP_Graphics3D_Proxy::GetInfo() { static const Info info = { &graphics_3d_interface, PPP_GRAPHICS_3D_INTERFACE, - INTERFACE_ID_PPP_GRAPHICS_3D, + API_ID_PPP_GRAPHICS_3D, false, &CreateGraphics3DProxy, }; diff --git a/ppapi/proxy/ppp_input_event_proxy.cc b/ppapi/proxy/ppp_input_event_proxy.cc index 7d72dfe..0215e72 100644 --- a/ppapi/proxy/ppp_input_event_proxy.cc +++ b/ppapi/proxy/ppp_input_event_proxy.cc @@ -40,10 +40,10 @@ PP_Bool HandleInputEvent(PP_Instance instance, PP_Resource input_event) { PP_Bool result = PP_FALSE; if (data.is_filtered) { dispatcher->Send(new PpapiMsg_PPPInputEvent_HandleFilteredInputEvent( - INTERFACE_ID_PPP_INPUT_EVENT, instance, data, &result)); + API_ID_PPP_INPUT_EVENT, instance, data, &result)); } else { dispatcher->Send(new PpapiMsg_PPPInputEvent_HandleInputEvent( - INTERFACE_ID_PPP_INPUT_EVENT, instance, data)); + API_ID_PPP_INPUT_EVENT, instance, data)); } return result; } @@ -75,7 +75,7 @@ const InterfaceProxy::Info* PPP_InputEvent_Proxy::GetInfo() { static const Info info = { &input_event_interface, PPP_INPUT_EVENT_INTERFACE, - INTERFACE_ID_PPP_INPUT_EVENT, + API_ID_PPP_INPUT_EVENT, false, &CreateInputEventProxy, }; diff --git a/ppapi/proxy/ppp_instance_private_proxy.cc b/ppapi/proxy/ppp_instance_private_proxy.cc index 82057a6..75e9d60 100644 --- a/ppapi/proxy/ppp_instance_private_proxy.cc +++ b/ppapi/proxy/ppp_instance_private_proxy.cc @@ -22,7 +22,7 @@ PP_Var GetInstanceObject(PP_Instance instance) { Dispatcher* dispatcher = HostDispatcher::GetForInstance(instance); ReceiveSerializedVarReturnValue result; dispatcher->Send(new PpapiMsg_PPPInstancePrivate_GetInstanceObject( - INTERFACE_ID_PPP_INSTANCE_PRIVATE, instance, &result)); + API_ID_PPP_INSTANCE_PRIVATE, instance, &result)); return result.Return(dispatcher); } @@ -53,7 +53,7 @@ const InterfaceProxy::Info* PPP_Instance_Private_Proxy::GetInfo() { static const Info info = { &instance_private_interface, PPP_INSTANCE_PRIVATE_INTERFACE, - INTERFACE_ID_PPP_INSTANCE_PRIVATE, + API_ID_PPP_INSTANCE_PRIVATE, false, &CreateInstancePrivateProxy, }; diff --git a/ppapi/proxy/ppp_instance_proxy.cc b/ppapi/proxy/ppp_instance_proxy.cc index 9463f28..28f7b78 100644 --- a/ppapi/proxy/ppp_instance_proxy.cc +++ b/ppapi/proxy/ppp_instance_proxy.cc @@ -35,14 +35,14 @@ PP_Bool DidCreate(PP_Instance instance, PP_Bool result = PP_FALSE; HostDispatcher::GetForInstance(instance)->Send( - new PpapiMsg_PPPInstance_DidCreate(INTERFACE_ID_PPP_INSTANCE, instance, + new PpapiMsg_PPPInstance_DidCreate(API_ID_PPP_INSTANCE, instance, argn_vect, argv_vect, &result)); return result; } void DidDestroy(PP_Instance instance) { HostDispatcher::GetForInstance(instance)->Send( - new PpapiMsg_PPPInstance_DidDestroy(INTERFACE_ID_PPP_INSTANCE, instance)); + new PpapiMsg_PPPInstance_DidDestroy(API_ID_PPP_INSTANCE, instance)); } void DidChangeView(PP_Instance instance, @@ -61,7 +61,7 @@ void DidChangeView(PP_Instance instance, PP_Bool flash_fullscreen = flash_fullscreen_interface->IsFullscreen(instance); dispatcher->Send( - new PpapiMsg_PPPInstance_DidChangeView(INTERFACE_ID_PPP_INSTANCE, + new PpapiMsg_PPPInstance_DidChangeView(API_ID_PPP_INSTANCE, instance, *position, *clip, fullscreen, flash_fullscreen)); @@ -69,7 +69,7 @@ void DidChangeView(PP_Instance instance, void DidChangeFocus(PP_Instance instance, PP_Bool has_focus) { HostDispatcher::GetForInstance(instance)->Send( - new PpapiMsg_PPPInstance_DidChangeFocus(INTERFACE_ID_PPP_INSTANCE, + new PpapiMsg_PPPInstance_DidChangeFocus(API_ID_PPP_INSTANCE, instance, has_focus)); } @@ -81,7 +81,7 @@ PP_Bool HandleDocumentLoad(PP_Instance instance, // Set up the URLLoader for proxying. PPB_URLLoader_Proxy* url_loader_proxy = static_cast<PPB_URLLoader_Proxy*>( - dispatcher->GetInterfaceProxy(INTERFACE_ID_PPB_URL_LOADER)); + dispatcher->GetInterfaceProxy(API_ID_PPB_URL_LOADER)); url_loader_proxy->PrepareURLLoaderForSendingToPlugin(url_loader); // PluginResourceTracker in the plugin process assumes that resources that it @@ -101,7 +101,7 @@ PP_Bool HandleDocumentLoad(PP_Instance instance, HostResource serialized_loader; serialized_loader.SetHostResource(instance, url_loader); dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad( - INTERFACE_ID_PPP_INSTANCE, instance, serialized_loader, &result)); + API_ID_PPP_INSTANCE, instance, serialized_loader, &result)); return result; } @@ -136,7 +136,7 @@ const InterfaceProxy::Info* PPP_Instance_Proxy::GetInfo1_0() { static const Info info = { &instance_interface_1_0, PPP_INSTANCE_INTERFACE_1_0, - INTERFACE_ID_PPP_INSTANCE, + API_ID_PPP_INSTANCE, false, &CreateInstanceProxy }; diff --git a/ppapi/proxy/ppp_messaging_proxy.cc b/ppapi/proxy/ppp_messaging_proxy.cc index 60cd8c4..7a45fd30 100644 --- a/ppapi/proxy/ppp_messaging_proxy.cc +++ b/ppapi/proxy/ppp_messaging_proxy.cc @@ -30,7 +30,7 @@ void HandleMessage(PP_Instance instance, PP_Var message_data) { } dispatcher->Send(new PpapiMsg_PPPMessaging_HandleMessage( - INTERFACE_ID_PPP_MESSAGING, + API_ID_PPP_MESSAGING, instance, SerializedVarSendInput(dispatcher, message_data))); } @@ -62,7 +62,7 @@ const InterfaceProxy::Info* PPP_Messaging_Proxy::GetInfo() { static const Info info = { &messaging_interface, PPP_MESSAGING_INTERFACE, - INTERFACE_ID_PPP_MESSAGING, + API_ID_PPP_MESSAGING, false, &CreateMessagingProxy, }; diff --git a/ppapi/proxy/ppp_mouse_lock_proxy.cc b/ppapi/proxy/ppp_mouse_lock_proxy.cc index 6983c64..91b7fb1 100644 --- a/ppapi/proxy/ppp_mouse_lock_proxy.cc +++ b/ppapi/proxy/ppp_mouse_lock_proxy.cc @@ -22,7 +22,7 @@ void MouseLockLost(PP_Instance instance) { } dispatcher->Send(new PpapiMsg_PPPMouseLock_MouseLockLost( - INTERFACE_ID_PPP_MOUSE_LOCK, instance)); + API_ID_PPP_MOUSE_LOCK, instance)); } static const PPP_MouseLock mouse_lock_interface = { @@ -51,7 +51,7 @@ const InterfaceProxy::Info* PPP_MouseLock_Proxy::GetInfo() { static const Info info = { &mouse_lock_interface, PPP_MOUSELOCK_INTERFACE, - INTERFACE_ID_PPP_MOUSE_LOCK, + API_ID_PPP_MOUSE_LOCK, false, &CreateMouseLockProxy, }; diff --git a/ppapi/proxy/ppp_video_decoder_proxy.cc b/ppapi/proxy/ppp_video_decoder_proxy.cc index 3852806..d0cb1f3 100644 --- a/ppapi/proxy/ppp_video_decoder_proxy.cc +++ b/ppapi/proxy/ppp_video_decoder_proxy.cc @@ -28,7 +28,7 @@ void ProvidePictureBuffers(PP_Instance instance, PP_Resource decoder, HostDispatcher::GetForInstance(instance)->Send( new PpapiMsg_PPPVideoDecoder_ProvidePictureBuffers( - INTERFACE_ID_PPP_VIDEO_DECODER_DEV, + API_ID_PPP_VIDEO_DECODER_DEV, decoder_resource, req_num_of_bufs, *dimensions)); } @@ -39,7 +39,7 @@ void DismissPictureBuffer(PP_Instance instance, PP_Resource decoder, HostDispatcher::GetForInstance(instance)->Send( new PpapiMsg_PPPVideoDecoder_DismissPictureBuffer( - INTERFACE_ID_PPP_VIDEO_DECODER_DEV, + API_ID_PPP_VIDEO_DECODER_DEV, decoder_resource, picture_buffer_id)); } @@ -50,7 +50,7 @@ void PictureReady(PP_Instance instance, PP_Resource decoder, HostDispatcher::GetForInstance(instance)->Send( new PpapiMsg_PPPVideoDecoder_PictureReady( - INTERFACE_ID_PPP_VIDEO_DECODER_DEV, decoder_resource, *picture)); + API_ID_PPP_VIDEO_DECODER_DEV, decoder_resource, *picture)); } void EndOfStream(PP_Instance instance, PP_Resource decoder) { @@ -59,7 +59,7 @@ void EndOfStream(PP_Instance instance, PP_Resource decoder) { HostDispatcher::GetForInstance(instance)->Send( new PpapiMsg_PPPVideoDecoder_NotifyEndOfStream( - INTERFACE_ID_PPP_VIDEO_DECODER_DEV, decoder_resource)); + API_ID_PPP_VIDEO_DECODER_DEV, decoder_resource)); } void NotifyError(PP_Instance instance, PP_Resource decoder, @@ -69,7 +69,7 @@ void NotifyError(PP_Instance instance, PP_Resource decoder, HostDispatcher::GetForInstance(instance)->Send( new PpapiMsg_PPPVideoDecoder_NotifyError( - INTERFACE_ID_PPP_VIDEO_DECODER_DEV, decoder_resource, error)); + API_ID_PPP_VIDEO_DECODER_DEV, decoder_resource, error)); } static const PPP_VideoDecoder_Dev video_decoder_interface = { @@ -103,7 +103,7 @@ const InterfaceProxy::Info* PPP_VideoDecoder_Proxy::GetInfo() { static const Info info = { &video_decoder_interface, PPP_VIDEODECODER_DEV_INTERFACE, - INTERFACE_ID_PPP_VIDEO_DECODER_DEV, + API_ID_PPP_VIDEO_DECODER_DEV, false, &CreateVideoDecoderPPPProxy, }; diff --git a/ppapi/proxy/resource_creation_proxy.cc b/ppapi/proxy/resource_creation_proxy.cc index b7d6c0c..2c074df 100644 --- a/ppapi/proxy/resource_creation_proxy.cc +++ b/ppapi/proxy/resource_creation_proxy.cc @@ -6,9 +6,8 @@ #include "ppapi/c/pp_errors.h" #include "ppapi/c/pp_size.h" -#include "ppapi/proxy/interface_id.h" -#include "ppapi/proxy/plugin_dispatcher.h" #include "ppapi/c/trusted/ppb_image_data_trusted.h" +#include "ppapi/proxy/plugin_dispatcher.h" #include "ppapi/proxy/plugin_resource_tracker.h" #include "ppapi/proxy/ppapi_messages.h" #include "ppapi/proxy/ppb_audio_proxy.h" @@ -30,6 +29,7 @@ #include "ppapi/proxy/ppb_url_loader_proxy.h" #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" @@ -190,7 +190,7 @@ PP_Resource ResourceCreationProxy::CreateImageData(PP_Instance instance, std::string image_data_desc; ImageHandle image_handle = ImageData::NullHandle; dispatcher->Send(new PpapiHostMsg_ResourceCreation_ImageData( - INTERFACE_ID_RESOURCE_CREATION, instance, format, size, init_to_zero, + API_ID_RESOURCE_CREATION, instance, format, size, init_to_zero, &result, &image_data_desc, &image_handle)); if (result.is_null() || image_data_desc.size() != sizeof(PP_ImageDataDesc)) |