diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-09 18:25:03 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-09 18:25:03 +0000 |
commit | 7cf4091e5e3eb7b3ee40c8fdc886226100b3a2e7 (patch) | |
tree | 423fdaae7c04f5ea304640618000675feb4e3443 /ppapi | |
parent | 57005ec7bf8cebf0e53a3e59dd9ca062ba1eb053 (diff) | |
download | chromium_src-7cf4091e5e3eb7b3ee40c8fdc886226100b3a2e7.zip chromium_src-7cf4091e5e3eb7b3ee40c8fdc886226100b3a2e7.tar.gz chromium_src-7cf4091e5e3eb7b3ee40c8fdc886226100b3a2e7.tar.bz2 |
Start deinlining non-empty virtual methods. (This will be automatically checked
for in the future.)
BUG=none
TEST=compiles
Review URL: http://codereview.chromium.org/5574006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68746 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi')
-rw-r--r-- | ppapi/cpp/module.cc | 4 | ||||
-rw-r--r-- | ppapi/cpp/module.h | 2 | ||||
-rw-r--r-- | ppapi/proxy/host_dispatcher.cc | 4 | ||||
-rw-r--r-- | ppapi/proxy/host_dispatcher.h | 2 | ||||
-rw-r--r-- | ppapi/proxy/plugin_dispatcher.cc | 4 | ||||
-rw-r--r-- | ppapi/proxy/plugin_dispatcher.h | 2 | ||||
-rw-r--r-- | ppapi/proxy/plugin_resource.cc | 6 | ||||
-rw-r--r-- | ppapi/proxy/plugin_resource.h | 2 |
8 files changed, 22 insertions, 4 deletions
diff --git a/ppapi/cpp/module.cc b/ppapi/cpp/module.cc index d6adddc..220609d 100644 --- a/ppapi/cpp/module.cc +++ b/ppapi/cpp/module.cc @@ -144,6 +144,10 @@ Module::~Module() { core_ = NULL; } +bool Module::Init() { + return true; +} + const void* Module::GetPluginInterface(const char* interface_name) { if (strcmp(interface_name, PPP_INSTANCE_INTERFACE) == 0) return &instance_interface; diff --git a/ppapi/cpp/module.h b/ppapi/cpp/module.h index 308d3ce..f3e8af7 100644 --- a/ppapi/cpp/module.h +++ b/ppapi/cpp/module.h @@ -35,7 +35,7 @@ class Module { // This function will be automatically called after the object is created. // This is where you can put functions that rely on other parts of the API, // now that the module has been created. - virtual bool Init() { return true; } + virtual bool Init(); // Returns the internal module handle. PP_Module pp_module() const { return pp_module_; } diff --git a/ppapi/proxy/host_dispatcher.cc b/ppapi/proxy/host_dispatcher.cc index 6e7a1f4..c196c14 100644 --- a/ppapi/proxy/host_dispatcher.cc +++ b/ppapi/proxy/host_dispatcher.cc @@ -72,6 +72,10 @@ void HostDispatcher::RemoveForInstance(PP_Instance instance) { g_instance_to_dispatcher->erase(found); } +bool HostDispatcher::IsPlugin() const { + return false; +} + } // namespace proxy } // namespace pp diff --git a/ppapi/proxy/host_dispatcher.h b/ppapi/proxy/host_dispatcher.h index f5b91b4..44d133a 100644 --- a/ppapi/proxy/host_dispatcher.h +++ b/ppapi/proxy/host_dispatcher.h @@ -54,7 +54,7 @@ class HostDispatcher : public Dispatcher { static void RemoveForInstance(PP_Instance instance); // Dispatcher overrides. - virtual bool IsPlugin() const { return false; } + virtual bool IsPlugin() const; private: DISALLOW_COPY_AND_ASSIGN(HostDispatcher); diff --git a/ppapi/proxy/plugin_dispatcher.cc b/ppapi/proxy/plugin_dispatcher.cc index 037b470..a6c97a0 100644 --- a/ppapi/proxy/plugin_dispatcher.cc +++ b/ppapi/proxy/plugin_dispatcher.cc @@ -66,6 +66,10 @@ void PluginDispatcher::SetGlobal(PluginDispatcher* dispatcher) { g_dispatcher = dispatcher; } +bool PluginDispatcher::IsPlugin() const { + return true; +} + void PluginDispatcher::OnMessageReceived(const IPC::Message& msg) { if (msg.routing_id() == MSG_ROUTING_CONTROL) { // Handle some plugin-specific control messages. diff --git a/ppapi/proxy/plugin_dispatcher.h b/ppapi/proxy/plugin_dispatcher.h index 8c75d33..5b8ffb7 100644 --- a/ppapi/proxy/plugin_dispatcher.h +++ b/ppapi/proxy/plugin_dispatcher.h @@ -43,7 +43,7 @@ class PluginDispatcher : public Dispatcher { static void SetGlobal(PluginDispatcher* dispatcher); // Dispatcher overrides. - virtual bool IsPlugin() const { return true; } + virtual bool IsPlugin() const; // IPC::Channel::Listener implementation. virtual void OnMessageReceived(const IPC::Message& msg); diff --git a/ppapi/proxy/plugin_resource.cc b/ppapi/proxy/plugin_resource.cc index b1a579e..d535cc7 100644 --- a/ppapi/proxy/plugin_resource.cc +++ b/ppapi/proxy/plugin_resource.cc @@ -13,5 +13,11 @@ PluginResource::PluginResource() { PluginResource::~PluginResource() { } +#define DEFINE_TYPE_GETTER(RESOURCE) \ + RESOURCE* PluginResource::As##RESOURCE() { return NULL; } +FOR_ALL_RESOURCES(DEFINE_TYPE_GETTER) +#undef DEFINE_TYPE_GETTER + + } // namespace proxy } // namespace pp diff --git a/ppapi/proxy/plugin_resource.h b/ppapi/proxy/plugin_resource.h index 52a8609..2c195bc 100644 --- a/ppapi/proxy/plugin_resource.h +++ b/ppapi/proxy/plugin_resource.h @@ -50,7 +50,7 @@ class PluginResource { // NULL if the resource does not match the specified type. Used by the Cast() // function. #define DEFINE_TYPE_GETTER(RESOURCE) \ - virtual RESOURCE* As##RESOURCE() { return NULL; } + virtual RESOURCE* As##RESOURCE(); FOR_ALL_RESOURCES(DEFINE_TYPE_GETTER) #undef DEFINE_TYPE_GETTER |