summaryrefslogtreecommitdiffstats
path: root/webkit/glue/plugins
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-13 20:10:45 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-13 20:10:45 +0000
commitddb1e5ae096bd91da721887fd55e68c603bf7067 (patch)
tree401d9a379ff03bb8b69a1ce9c23fe182f673f587 /webkit/glue/plugins
parent1c9526e0650a91e412d815417634c9f193b1a4d5 (diff)
downloadchromium_src-ddb1e5ae096bd91da721887fd55e68c603bf7067.zip
chromium_src-ddb1e5ae096bd91da721887fd55e68c603bf7067.tar.gz
chromium_src-ddb1e5ae096bd91da721887fd55e68c603bf7067.tar.bz2
Even more virtual method deinlining.
BUG=none TEST=compiles Review URL: http://codereview.chromium.org/5741001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69041 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/plugins')
-rw-r--r--webkit/glue/plugins/pepper_graphics_2d.cc4
-rw-r--r--webkit/glue/plugins/pepper_graphics_2d.h2
-rw-r--r--webkit/glue/plugins/pepper_graphics_3d.cc4
-rw-r--r--webkit/glue/plugins/pepper_graphics_3d.h4
-rw-r--r--webkit/glue/plugins/pepper_image_data.cc4
-rw-r--r--webkit/glue/plugins/pepper_image_data.h2
-rw-r--r--webkit/glue/plugins/pepper_resource.cc5
-rw-r--r--webkit/glue/plugins/pepper_resource.h3
-rw-r--r--webkit/glue/plugins/pepper_transport.cc4
-rw-r--r--webkit/glue/plugins/pepper_transport.h4
-rw-r--r--webkit/glue/plugins/pepper_var.cc12
-rw-r--r--webkit/glue/plugins/pepper_var.h6
-rw-r--r--webkit/glue/plugins/plugin_stream.cc4
-rw-r--r--webkit/glue/plugins/plugin_stream.h4
14 files changed, 46 insertions, 16 deletions
diff --git a/webkit/glue/plugins/pepper_graphics_2d.cc b/webkit/glue/plugins/pepper_graphics_2d.cc
index 7ccfae5..f051b89 100644
--- a/webkit/glue/plugins/pepper_graphics_2d.cc
+++ b/webkit/glue/plugins/pepper_graphics_2d.cc
@@ -243,6 +243,10 @@ bool Graphics2D::Init(int width, int height, bool is_always_opaque) {
return true;
}
+Graphics2D* Graphics2D::AsGraphics2D() {
+ return this;
+}
+
PP_Bool Graphics2D::Describe(PP_Size* size, PP_Bool* is_always_opaque) {
size->width = image_data_->width();
size->height = image_data_->height();
diff --git a/webkit/glue/plugins/pepper_graphics_2d.h b/webkit/glue/plugins/pepper_graphics_2d.h
index 78170ab..320209a 100644
--- a/webkit/glue/plugins/pepper_graphics_2d.h
+++ b/webkit/glue/plugins/pepper_graphics_2d.h
@@ -39,7 +39,7 @@ class Graphics2D : public Resource {
bool is_always_opaque() const { return is_always_opaque_; }
// Resource override.
- virtual Graphics2D* AsGraphics2D() { return this; }
+ virtual Graphics2D* AsGraphics2D();
// PPB_Graphics2D functions.
PP_Bool Describe(PP_Size* size, PP_Bool* is_always_opaque);
diff --git a/webkit/glue/plugins/pepper_graphics_3d.cc b/webkit/glue/plugins/pepper_graphics_3d.cc
index 2dc4def..34551da 100644
--- a/webkit/glue/plugins/pepper_graphics_3d.cc
+++ b/webkit/glue/plugins/pepper_graphics_3d.cc
@@ -145,6 +145,10 @@ void Graphics3D::ResetCurrent() {
CurrentContextKey::get()->Set(NULL);
}
+Graphics3D* Graphics3D::AsGraphics3D() {
+ return this;
+}
+
Graphics3D::~Graphics3D() {
Destroy();
}
diff --git a/webkit/glue/plugins/pepper_graphics_3d.h b/webkit/glue/plugins/pepper_graphics_3d.h
index 5c00068..420a364 100644
--- a/webkit/glue/plugins/pepper_graphics_3d.h
+++ b/webkit/glue/plugins/pepper_graphics_3d.h
@@ -41,9 +41,7 @@ class Graphics3D : public Resource {
static void ResetCurrent();
// Resource override.
- virtual Graphics3D* AsGraphics3D() {
- return this;
- }
+ virtual Graphics3D* AsGraphics3D();
bool Init(PP_Instance instance_id, int32_t config,
const int32_t* attrib_list);
diff --git a/webkit/glue/plugins/pepper_image_data.cc b/webkit/glue/plugins/pepper_image_data.cc
index 7a0ecb1..13fb4ef 100644
--- a/webkit/glue/plugins/pepper_image_data.cc
+++ b/webkit/glue/plugins/pepper_image_data.cc
@@ -142,6 +142,10 @@ bool ImageData::IsImageDataFormatSupported(PP_ImageDataFormat format) {
format == PP_IMAGEDATAFORMAT_RGBA_PREMUL;
}
+ImageData* ImageData::AsImageData() {
+ return this;
+}
+
bool ImageData::Init(PP_ImageDataFormat format,
int width, int height,
bool init_to_zero) {
diff --git a/webkit/glue/plugins/pepper_image_data.h b/webkit/glue/plugins/pepper_image_data.h
index 75bead7..2c7adde 100644
--- a/webkit/glue/plugins/pepper_image_data.h
+++ b/webkit/glue/plugins/pepper_image_data.h
@@ -53,7 +53,7 @@ class ImageData : public Resource {
static bool IsImageDataFormatSupported(PP_ImageDataFormat format);
// Resource overrides.
- virtual ImageData* AsImageData() { return this; }
+ virtual ImageData* AsImageData();
// PPB_ImageData implementation.
bool Init(PP_ImageDataFormat format,
diff --git a/webkit/glue/plugins/pepper_resource.cc b/webkit/glue/plugins/pepper_resource.cc
index 851d6e7..34d6ee3 100644
--- a/webkit/glue/plugins/pepper_resource.cc
+++ b/webkit/glue/plugins/pepper_resource.cc
@@ -34,4 +34,9 @@ void Resource::StoppedTracking() {
resource_id_ = 0;
}
+#define DEFINE_TYPE_GETTER(RESOURCE) \
+ RESOURCE* Resource::As##RESOURCE() { return NULL; }
+FOR_ALL_RESOURCES(DEFINE_TYPE_GETTER)
+#undef DEFINE_TYPE_GETTER
+
} // namespace pepper
diff --git a/webkit/glue/plugins/pepper_resource.h b/webkit/glue/plugins/pepper_resource.h
index 551b89d..3d7d307 100644
--- a/webkit/glue/plugins/pepper_resource.h
+++ b/webkit/glue/plugins/pepper_resource.h
@@ -103,7 +103,7 @@ class Resource : public base::RefCountedThreadSafe<Resource> {
// 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
@@ -135,7 +135,6 @@ class Resource : public base::RefCountedThreadSafe<Resource> {
FOR_ALL_RESOURCES(DEFINE_RESOURCE_CAST)
#undef DEFINE_RESOURCE_CAST
-#undef FOR_ALL_RESOURCES
} // namespace pepper
#endif // WEBKIT_GLUE_PLUGINS_PEPPER_RESOURCE_H_
diff --git a/webkit/glue/plugins/pepper_transport.cc b/webkit/glue/plugins/pepper_transport.cc
index 29a4495..f43d502 100644
--- a/webkit/glue/plugins/pepper_transport.cc
+++ b/webkit/glue/plugins/pepper_transport.cc
@@ -130,6 +130,10 @@ Transport::~Transport() {
// TODO(juberti): teardown
}
+Transport* Transport::AsTransport() {
+ return this;
+}
+
bool Transport::Init(const char* name,
const char* proto) {
// TODO(juberti): impl
diff --git a/webkit/glue/plugins/pepper_transport.h b/webkit/glue/plugins/pepper_transport.h
index fbba691..500dda0 100644
--- a/webkit/glue/plugins/pepper_transport.h
+++ b/webkit/glue/plugins/pepper_transport.h
@@ -19,9 +19,7 @@ class Transport : public Resource {
explicit Transport(PluginModule* module);
virtual ~Transport();
static const PPB_Transport_Dev* GetInterface();
- virtual Transport* AsTransport() {
- return this;
- }
+ virtual Transport* AsTransport();
bool Init(const char* name,
const char* proto);
private:
diff --git a/webkit/glue/plugins/pepper_var.cc b/webkit/glue/plugins/pepper_var.cc
index db83229..24fa2c3 100644
--- a/webkit/glue/plugins/pepper_var.cc
+++ b/webkit/glue/plugins/pepper_var.cc
@@ -652,6 +652,10 @@ Var::Var(PluginModule* module) : Resource(module) {
Var::~Var() {
}
+Var* Var::AsVar() {
+ return this;
+}
+
// static
PP_Var Var::NPVariantToPPVar(PluginModule* module, const NPVariant* variant) {
switch (variant->type) {
@@ -744,6 +748,10 @@ StringVar::StringVar(PluginModule* module, const char* str, uint32 len)
StringVar::~StringVar() {
}
+StringVar* StringVar::AsStringVar() {
+ return this;
+}
+
// static
PP_Var StringVar::StringToPPVar(PluginModule* module, const std::string& var) {
return StringToPPVar(module, var.c_str(), var.size());
@@ -785,6 +793,10 @@ ObjectVar::~ObjectVar() {
WebBindings::releaseObject(np_object_);
}
+ObjectVar* ObjectVar::AsObjectVar() {
+ return this;
+}
+
// static
PP_Var ObjectVar::NPObjectToPPVar(PluginModule* module, NPObject* object) {
scoped_refptr<ObjectVar> object_var(module->ObjectVarForNPObject(object));
diff --git a/webkit/glue/plugins/pepper_var.h b/webkit/glue/plugins/pepper_var.h
index 8929448..e59920a 100644
--- a/webkit/glue/plugins/pepper_var.h
+++ b/webkit/glue/plugins/pepper_var.h
@@ -28,7 +28,7 @@ class Var : public Resource {
virtual ~Var();
// Resource overrides.
- virtual Var* AsVar() { return this; }
+ virtual Var* AsVar();
// Returns a PP_Var that corresponds to the given NPVariant. The contents of
// the NPVariant will be copied unless the NPVariant corresponds to an
@@ -114,7 +114,7 @@ class StringVar : public Var {
const std::string& value() const { return value_; }
// Resource overrides.
- virtual StringVar* AsStringVar() { return this; }
+ virtual StringVar* AsStringVar();
// Helper function to create a PP_Var of type string that contains a copy of
// the given string. The input data must be valid UTF-8 encoded text, if it
@@ -154,7 +154,7 @@ class ObjectVar : public Var {
virtual ~ObjectVar();
// Resource overrides.
- virtual ObjectVar* AsObjectVar() { return this; }
+ virtual ObjectVar* AsObjectVar();
// Returns the underlying NPObject corresponding to this ObjectVar.
// Guaranteed non-NULL.
diff --git a/webkit/glue/plugins/plugin_stream.cc b/webkit/glue/plugins/plugin_stream.cc
index 728b180..e465e2d 100644
--- a/webkit/glue/plugins/plugin_stream.cc
+++ b/webkit/glue/plugins/plugin_stream.cc
@@ -244,6 +244,10 @@ bool PluginStream::Close(NPReason reason) {
return true;
}
+webkit_glue::WebPluginResourceClient* PluginStream::AsResourceClient() {
+ return NULL;
+}
+
void PluginStream::Notify(NPReason reason) {
if (notify_needed_) {
instance_->NPP_URLNotify(stream_.url, reason, notify_data_);
diff --git a/webkit/glue/plugins/plugin_stream.h b/webkit/glue/plugins/plugin_stream.h
index b277465..c5975b4 100644
--- a/webkit/glue/plugins/plugin_stream.h
+++ b/webkit/glue/plugins/plugin_stream.h
@@ -64,9 +64,7 @@ class PluginStream : public base::RefCounted<PluginStream> {
// Close the stream.
virtual bool Close(NPReason reason);
- virtual webkit_glue::WebPluginResourceClient* AsResourceClient() {
- return NULL;
- }
+ virtual webkit_glue::WebPluginResourceClient* AsResourceClient();
// Cancels any HTTP requests initiated by the stream.
virtual void CancelRequest() {}