summaryrefslogtreecommitdiffstats
path: root/chrome/plugin/npobject_stub.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/plugin/npobject_stub.h')
-rw-r--r--chrome/plugin/npobject_stub.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/chrome/plugin/npobject_stub.h b/chrome/plugin/npobject_stub.h
index a2e2022..2d3b190 100644
--- a/chrome/plugin/npobject_stub.h
+++ b/chrome/plugin/npobject_stub.h
@@ -13,6 +13,7 @@
#include "app/gfx/native_widget_types.h"
#include "base/ref_counted.h"
#include "base/weak_ptr.h"
+#include "chrome/plugin/npobject_base.h"
#include "googleurl/src/gurl.h"
#include "ipc/ipc_channel.h"
@@ -26,7 +27,8 @@ struct NPVariant_Param;
// more information.
class NPObjectStub : public IPC::Channel::Listener,
public IPC::Message::Sender,
- public base::SupportsWeakPtr<NPObjectStub> {
+ public base::SupportsWeakPtr<NPObjectStub>,
+ public NPObjectBase {
public:
NPObjectStub(NPObject* npobject,
PluginChannelBase* channel,
@@ -43,6 +45,15 @@ class NPObjectStub : public IPC::Channel::Listener,
// window script object on destruction to avoid leaks.
void OnPluginDestroyed();
+ // NPObjectBase implementation.
+ virtual NPObject* GetUnderlyingNPObject() {
+ return npobject_;
+ }
+
+ IPC::Channel::Listener* GetChannelListener() {
+ return static_cast<IPC::Channel::Listener*>(this);
+ }
+
private:
// IPC::Channel::Listener implementation:
void OnMessageReceived(const IPC::Message& message);