diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-08 18:06:44 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-08 18:06:44 +0000 |
commit | 78994ab0a043ead9b3edb4a48c7f13cc6c2aede6 (patch) | |
tree | 357ae4e0cf8bf140e616d3086b29472043aaf0e5 /chrome/plugin | |
parent | a7a265efd24072f9dc7b5f737ec84d5ae0553cd6 (diff) | |
download | chromium_src-78994ab0a043ead9b3edb4a48c7f13cc6c2aede6.zip chromium_src-78994ab0a043ead9b3edb4a48c7f13cc6c2aede6.tar.gz chromium_src-78994ab0a043ead9b3edb4a48c7f13cc6c2aede6.tar.bz2 |
Add the "virtual" keyword on method overrides that are missing it.
BUG=none
TEST=compiles
Review URL: http://codereview.chromium.org/5648004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68606 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/plugin')
-rw-r--r-- | chrome/plugin/npobject_proxy.cc | 8 | ||||
-rw-r--r-- | chrome/plugin/npobject_proxy.h | 14 | ||||
-rw-r--r-- | chrome/plugin/npobject_stub.cc | 8 | ||||
-rw-r--r-- | chrome/plugin/npobject_stub.h | 14 | ||||
-rw-r--r-- | chrome/plugin/plugin_channel.h | 6 | ||||
-rw-r--r-- | chrome/plugin/webplugin_proxy.cc | 4 | ||||
-rw-r--r-- | chrome/plugin/webplugin_proxy.h | 63 |
7 files changed, 64 insertions, 53 deletions
diff --git a/chrome/plugin/npobject_proxy.cc b/chrome/plugin/npobject_proxy.cc index 2601476..f245151 100644 --- a/chrome/plugin/npobject_proxy.cc +++ b/chrome/plugin/npobject_proxy.cc @@ -46,6 +46,14 @@ NPObjectProxy* NPObjectProxy::GetProxy(NPObject* object) { return proxy; } +NPObject* NPObjectProxy::GetUnderlyingNPObject() { + return NULL; +} + +IPC::Channel::Listener* NPObjectProxy::GetChannelListener() { + return static_cast<IPC::Channel::Listener*>(this); +} + NPObjectProxy::NPObjectProxy( PluginChannelBase* channel, int route_id, diff --git a/chrome/plugin/npobject_proxy.h b/chrome/plugin/npobject_proxy.h index f521b92..6b6e7ff 100644 --- a/chrome/plugin/npobject_proxy.h +++ b/chrome/plugin/npobject_proxy.h @@ -39,7 +39,7 @@ class NPObjectProxy : public IPC::Channel::Listener, const GURL& page_url); // IPC::Message::Sender implementation: - bool Send(IPC::Message* msg); + virtual bool Send(IPC::Message* msg); int route_id() { return route_id_; } PluginChannelBase* channel() { return channel_; } @@ -91,13 +91,9 @@ class NPObjectProxy : public IPC::Channel::Listener, static const NPClass* npclass() { return &npclass_proxy_; } // NPObjectBase implementation. - virtual NPObject* GetUnderlyingNPObject() { - return NULL; - } + virtual NPObject* GetUnderlyingNPObject(); - IPC::Channel::Listener* GetChannelListener() { - return static_cast<IPC::Channel::Listener*>(this); - } + virtual IPC::Channel::Listener* GetChannelListener(); private: NPObjectProxy(PluginChannelBase* channel, @@ -106,8 +102,8 @@ class NPObjectProxy : public IPC::Channel::Listener, const GURL& page_url); // IPC::Channel::Listener implementation: - void OnMessageReceived(const IPC::Message& msg); - void OnChannelError(); + virtual void OnMessageReceived(const IPC::Message& msg); + virtual void OnChannelError(); static NPObject* NPAllocate(NPP, NPClass*); static void NPDeallocate(NPObject* npObj); diff --git a/chrome/plugin/npobject_stub.cc b/chrome/plugin/npobject_stub.cc index 18e5b4c..c711756 100644 --- a/chrome/plugin/npobject_stub.cc +++ b/chrome/plugin/npobject_stub.cc @@ -54,6 +54,14 @@ void NPObjectStub::OnPluginDestroyed() { MessageLoop::current()->DeleteSoon(FROM_HERE, this); } +NPObject* NPObjectStub::GetUnderlyingNPObject() { + return npobject_; +} + +IPC::Channel::Listener* NPObjectStub::GetChannelListener() { + return static_cast<IPC::Channel::Listener*>(this); +} + void NPObjectStub::OnMessageReceived(const IPC::Message& msg) { child_process_logging::SetActiveURL(page_url_); diff --git a/chrome/plugin/npobject_stub.h b/chrome/plugin/npobject_stub.h index fde0a5e..248d001 100644 --- a/chrome/plugin/npobject_stub.h +++ b/chrome/plugin/npobject_stub.h @@ -39,7 +39,7 @@ class NPObjectStub : public IPC::Channel::Listener, ~NPObjectStub(); // IPC::Message::Sender implementation: - bool Send(IPC::Message* msg); + virtual bool Send(IPC::Message* msg); // Called when the plugin widget that this NPObject came from is destroyed. // This is needed because the renderer calls NPN_DeallocateObject on the @@ -47,18 +47,14 @@ class NPObjectStub : public IPC::Channel::Listener, void OnPluginDestroyed(); // NPObjectBase implementation. - virtual NPObject* GetUnderlyingNPObject() { - return npobject_; - } + virtual NPObject* GetUnderlyingNPObject(); - IPC::Channel::Listener* GetChannelListener() { - return static_cast<IPC::Channel::Listener*>(this); - } + virtual IPC::Channel::Listener* GetChannelListener(); private: // IPC::Channel::Listener implementation: - void OnMessageReceived(const IPC::Message& message); - void OnChannelError(); + virtual void OnMessageReceived(const IPC::Message& message); + virtual void OnChannelError(); // message handlers void OnRelease(IPC::Message* reply_msg); diff --git a/chrome/plugin/plugin_channel.h b/chrome/plugin/plugin_channel.h index cc444c0..2c00cf8 100644 --- a/chrome/plugin/plugin_channel.h +++ b/chrome/plugin/plugin_channel.h @@ -30,7 +30,7 @@ class PluginChannel : public PluginChannelBase { // Send a message to all renderers that the process is going to shutdown. static void NotifyRenderersOfPendingShutdown(); - ~PluginChannel(); + virtual ~PluginChannel(); virtual bool Send(IPC::Message* msg); virtual void OnMessageReceived(const IPC::Message& message); @@ -38,7 +38,7 @@ class PluginChannel : public PluginChannelBase { base::ProcessHandle renderer_handle() const { return renderer_handle_; } int renderer_id() { return renderer_id_; } - int GenerateRouteID(); + virtual int GenerateRouteID(); // Returns the event that's set when a call to the renderer causes a modal // dialog to come up. @@ -69,7 +69,7 @@ class PluginChannel : public PluginChannelBase { // Called on the plugin thread PluginChannel(); - void OnControlMessageReceived(const IPC::Message& msg); + virtual void OnControlMessageReceived(const IPC::Message& msg); static PluginChannelBase* ClassFactory() { return new PluginChannel(); } diff --git a/chrome/plugin/webplugin_proxy.cc b/chrome/plugin/webplugin_proxy.cc index 0b04a94..87a4772 100644 --- a/chrome/plugin/webplugin_proxy.cc +++ b/chrome/plugin/webplugin_proxy.cc @@ -115,6 +115,10 @@ void WebPluginProxy::SetWindow(gfx::PluginWindowHandle window) { Send(new PluginHostMsg_SetWindow(route_id_, window)); } +void WebPluginProxy::SetAcceptsInputEvents(bool accepts) { + NOTREACHED(); +} + void WebPluginProxy::WillDestroyWindow(gfx::PluginWindowHandle window) { #if defined(OS_WIN) PluginThread::current()->Send( diff --git a/chrome/plugin/webplugin_proxy.h b/chrome/plugin/webplugin_proxy.h index d9a4c67..66b396c 100644 --- a/chrome/plugin/webplugin_proxy.h +++ b/chrome/plugin/webplugin_proxy.h @@ -48,31 +48,30 @@ class WebPluginProxy : public webkit_glue::WebPlugin { void set_delegate(WebPluginDelegateImpl* d) { delegate_ = d; } // WebPlugin overrides - void SetWindow(gfx::PluginWindowHandle window); + virtual void SetWindow(gfx::PluginWindowHandle window); // Whether input events should be sent to the delegate. - virtual void SetAcceptsInputEvents(bool accepts) { - NOTREACHED(); - } + virtual void SetAcceptsInputEvents(bool accepts); - void WillDestroyWindow(gfx::PluginWindowHandle window); + virtual void WillDestroyWindow(gfx::PluginWindowHandle window); #if defined(OS_WIN) void SetWindowlessPumpEvent(HANDLE pump_messages_event); #endif - void CancelResource(unsigned long id); - void Invalidate(); - void InvalidateRect(const gfx::Rect& rect); - NPObject* GetWindowScriptNPObject(); - NPObject* GetPluginElement(); - void SetCookie(const GURL& url, - const GURL& first_party_for_cookies, - const std::string& cookie); - std::string GetCookies(const GURL& url, const GURL& first_party_for_cookies); - - void ShowModalHTMLDialog(const GURL& url, int width, int height, - const std::string& json_arguments, - std::string* json_retval); + virtual void CancelResource(unsigned long id); + virtual void Invalidate(); + virtual void InvalidateRect(const gfx::Rect& rect); + virtual NPObject* GetWindowScriptNPObject(); + virtual NPObject* GetPluginElement(); + virtual void SetCookie(const GURL& url, + const GURL& first_party_for_cookies, + const std::string& cookie); + virtual std::string GetCookies(const GURL& url, + const GURL& first_party_for_cookies); + + virtual void ShowModalHTMLDialog(const GURL& url, int width, int height, + const std::string& json_arguments, + std::string* json_retval); // Called by gears over the CPAPI interface to verify that the given event is // the current (javascript) drag event the browser is dispatching, and return @@ -81,7 +80,7 @@ class WebPluginProxy : public webkit_glue::WebPlugin { int32* event_id, std::string* type, std::string* data); bool SetDropEffect(struct NPObject* event, int effect); - void OnMissingPluginStatus(int status); + virtual void OnMissingPluginStatus(int status); // class-specific methods // Retrieves the browsing context associated with the renderer this plugin @@ -114,14 +113,14 @@ class WebPluginProxy : public webkit_glue::WebPlugin { void OnResourceCreated(int resource_id, webkit_glue::WebPluginResourceClient* client); - void HandleURLRequest(const char* url, - const char* method, - const char* target, - const char* buf, - unsigned int len, - int notify_id, - bool popups_allowed, - bool notify_redirects); + virtual void HandleURLRequest(const char* url, + const char* method, + const char* target, + const char* buf, + unsigned int len, + int notify_id, + bool popups_allowed, + bool notify_redirects); void UpdateGeometry(const gfx::Rect& window_rect, const gfx::Rect& clip_rect, const TransportDIB::Handle& windowless_buffer, @@ -132,12 +131,12 @@ class WebPluginProxy : public webkit_glue::WebPlugin { int ack_key #endif ); - void CancelDocumentLoad(); - void InitiateHTTPRangeRequest( + virtual void CancelDocumentLoad(); + virtual void InitiateHTTPRangeRequest( const char* url, const char* range_info, int range_request_id); - void SetDeferResourceLoading(unsigned long resource_id, bool defer); - bool IsOffTheRecord(); - void ResourceClientDeleted( + virtual void SetDeferResourceLoading(unsigned long resource_id, bool defer); + virtual bool IsOffTheRecord(); + virtual void ResourceClientDeleted( webkit_glue::WebPluginResourceClient* resource_client); gfx::NativeViewId containing_window() { return containing_window_; } |