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 /webkit | |
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 'webkit')
30 files changed, 106 insertions, 50 deletions
diff --git a/webkit/appcache/appcache_update_job.h b/webkit/appcache/appcache_update_job.h index dacff44..8b75312 100644 --- a/webkit/appcache/appcache_update_job.h +++ b/webkit/appcache/appcache_update_job.h @@ -102,15 +102,17 @@ class AppCacheUpdateJob : public net::URLRequest::Delegate, // TODO(jennb): any other delegate callbacks to handle? certificate? // Methods for AppCacheStorage::Delegate. - void OnResponseInfoLoaded(AppCacheResponseInfo* response_info, - int64 response_id); - void OnGroupAndNewestCacheStored(AppCacheGroup* group, AppCache* newest_cache, - bool success, bool would_exceed_quota); - void OnGroupMadeObsolete(AppCacheGroup* group, bool success); + virtual void OnResponseInfoLoaded(AppCacheResponseInfo* response_info, + int64 response_id); + virtual void OnGroupAndNewestCacheStored(AppCacheGroup* group, + AppCache* newest_cache, + bool success, + bool would_exceed_quota); + virtual void OnGroupMadeObsolete(AppCacheGroup* group, bool success); // Methods for AppCacheHost::Observer. - void OnCacheSelectionComplete(AppCacheHost* host) {} // N/A - void OnDestructionImminent(AppCacheHost* host); + virtual void OnCacheSelectionComplete(AppCacheHost* host) {} // N/A + virtual void OnDestructionImminent(AppCacheHost* host); void CheckPolicy(); void OnPolicyCheckComplete(int rv); diff --git a/webkit/glue/plugins/pepper_buffer.cc b/webkit/glue/plugins/pepper_buffer.cc index b17370e..fc3c34d 100644 --- a/webkit/glue/plugins/pepper_buffer.cc +++ b/webkit/glue/plugins/pepper_buffer.cc @@ -81,6 +81,8 @@ const PPB_Buffer_Dev* Buffer::GetInterface() { return &ppb_buffer; } +Buffer* Buffer::AsBuffer() { return this; } + bool Buffer::Init(uint32_t size) { if (size == 0) return false; diff --git a/webkit/glue/plugins/pepper_buffer.h b/webkit/glue/plugins/pepper_buffer.h index 2066bc1..c00711e 100644 --- a/webkit/glue/plugins/pepper_buffer.h +++ b/webkit/glue/plugins/pepper_buffer.h @@ -32,7 +32,7 @@ class Buffer : public Resource { static const PPB_Buffer_Dev* GetInterface(); // Resource overrides. - Buffer* AsBuffer() { return this; } + virtual Buffer* AsBuffer(); // PPB_Buffer implementation. bool Init(uint32_t size); diff --git a/webkit/glue/plugins/pepper_directory_reader.cc b/webkit/glue/plugins/pepper_directory_reader.cc index c476b76..9f7b819 100644 --- a/webkit/glue/plugins/pepper_directory_reader.cc +++ b/webkit/glue/plugins/pepper_directory_reader.cc @@ -89,6 +89,10 @@ const PPB_DirectoryReader_Dev* DirectoryReader::GetInterface() { return &ppb_directoryreader; } +DirectoryReader* DirectoryReader::AsDirectoryReader() { + return this; +} + int32_t DirectoryReader::GetNextEntry(PP_DirectoryEntry_Dev* entry, PP_CompletionCallback callback) { if (directory_ref_->GetFileSystemType() == PP_FILESYSTEMTYPE_EXTERNAL) diff --git a/webkit/glue/plugins/pepper_directory_reader.h b/webkit/glue/plugins/pepper_directory_reader.h index 38496bb8..3f415e2a 100644 --- a/webkit/glue/plugins/pepper_directory_reader.h +++ b/webkit/glue/plugins/pepper_directory_reader.h @@ -28,7 +28,7 @@ class DirectoryReader : public Resource { static const PPB_DirectoryReader_Dev* GetInterface(); // Resource overrides. - DirectoryReader* AsDirectoryReader() { return this; } + virtual DirectoryReader* AsDirectoryReader(); // PPB_DirectoryReader implementation. int32_t GetNextEntry(PP_DirectoryEntry_Dev* entry, diff --git a/webkit/glue/plugins/pepper_file_chooser.cc b/webkit/glue/plugins/pepper_file_chooser.cc index 2b54790..52f2b55 100644 --- a/webkit/glue/plugins/pepper_file_chooser.cc +++ b/webkit/glue/plugins/pepper_file_chooser.cc @@ -119,6 +119,10 @@ const PPB_FileChooser_Dev* FileChooser::GetInterface() { return &ppb_filechooser; } +FileChooser* FileChooser::AsFileChooser() { + return this; +} + void FileChooser::StoreChosenFiles(const std::vector<std::string>& files) { next_chosen_file_index_ = 0; std::vector<std::string>::const_iterator end_it = files.end(); diff --git a/webkit/glue/plugins/pepper_file_chooser.h b/webkit/glue/plugins/pepper_file_chooser.h index 664f934..9d3d9e9 100644 --- a/webkit/glue/plugins/pepper_file_chooser.h +++ b/webkit/glue/plugins/pepper_file_chooser.h @@ -29,7 +29,7 @@ class FileChooser : public Resource { static const PPB_FileChooser_Dev* GetInterface(); // Resource overrides. - FileChooser* AsFileChooser() { return this; } + virtual FileChooser* AsFileChooser(); // Stores the list of selected files. void StoreChosenFiles(const std::vector<std::string>& files); diff --git a/webkit/glue/plugins/pepper_file_io.cc b/webkit/glue/plugins/pepper_file_io.cc index 1d3d66e..b93b635 100644 --- a/webkit/glue/plugins/pepper_file_io.cc +++ b/webkit/glue/plugins/pepper_file_io.cc @@ -210,6 +210,10 @@ const PPB_FileIOTrusted_Dev* FileIO::GetTrustedInterface() { return &ppb_fileiotrusted; } +FileIO* FileIO::AsFileIO() { + return this; +} + int32_t FileIO::Open(FileRef* file_ref, int32_t open_flags, PP_CompletionCallback callback) { diff --git a/webkit/glue/plugins/pepper_file_io.h b/webkit/glue/plugins/pepper_file_io.h index 6fee92d..0ed2194 100644 --- a/webkit/glue/plugins/pepper_file_io.h +++ b/webkit/glue/plugins/pepper_file_io.h @@ -37,7 +37,7 @@ class FileIO : public Resource { static const PPB_FileIOTrusted_Dev* GetTrustedInterface(); // Resource overrides. - FileIO* AsFileIO() { return this; } + virtual FileIO* AsFileIO(); // PPB_FileIO implementation. int32_t Open(FileRef* file_ref, diff --git a/webkit/glue/plugins/pepper_file_ref.cc b/webkit/glue/plugins/pepper_file_ref.cc index 6068a29..c1feca1 100644 --- a/webkit/glue/plugins/pepper_file_ref.cc +++ b/webkit/glue/plugins/pepper_file_ref.cc @@ -265,6 +265,10 @@ const PPB_FileRef_Dev* FileRef::GetInterface() { return &ppb_fileref; } +FileRef* FileRef::AsFileRef() { + return this; +} + std::string FileRef::GetName() const { if (GetFileSystemType() == PP_FILESYSTEMTYPE_EXTERNAL) { FilePath::StringType path = system_path_.value(); diff --git a/webkit/glue/plugins/pepper_file_ref.h b/webkit/glue/plugins/pepper_file_ref.h index 88020c1..d0a0439 100644 --- a/webkit/glue/plugins/pepper_file_ref.h +++ b/webkit/glue/plugins/pepper_file_ref.h @@ -32,7 +32,7 @@ class FileRef : public Resource { static const PPB_FileRef_Dev* GetInterface(); // Resource overrides. - FileRef* AsFileRef() { return this; } + virtual FileRef* AsFileRef(); // PPB_FileRef implementation. std::string GetName() const; diff --git a/webkit/glue/plugins/pepper_file_system.cc b/webkit/glue/plugins/pepper_file_system.cc index 9262798..429162a 100644 --- a/webkit/glue/plugins/pepper_file_system.cc +++ b/webkit/glue/plugins/pepper_file_system.cc @@ -78,6 +78,10 @@ FileSystem::FileSystem(PluginInstance* instance, PP_FileSystemType_Dev type) opened_(false) { } +FileSystem* FileSystem::AsFileSystem() { + return this; +} + const PPB_FileSystem_Dev* FileSystem::GetInterface() { return &ppb_filesystem; } diff --git a/webkit/glue/plugins/pepper_file_system.h b/webkit/glue/plugins/pepper_file_system.h index 97f1c7d..042a69d 100644 --- a/webkit/glue/plugins/pepper_file_system.h +++ b/webkit/glue/plugins/pepper_file_system.h @@ -23,7 +23,7 @@ class FileSystem : public Resource { static const PPB_FileSystem_Dev* GetInterface(); FileSystem(PluginInstance* instance, PP_FileSystemType_Dev type); - FileSystem* AsFileSystem() { return this; } + virtual FileSystem* AsFileSystem(); PluginInstance* instance() { return instance_; } PP_FileSystemType_Dev type() { return type_; } diff --git a/webkit/glue/plugins/pepper_font.cc b/webkit/glue/plugins/pepper_font.cc index f871e69..5d841aa 100644 --- a/webkit/glue/plugins/pepper_font.cc +++ b/webkit/glue/plugins/pepper_font.cc @@ -199,6 +199,10 @@ const PPB_Font_Dev* Font::GetInterface() { return &ppb_font; } +Font* Font::AsFont() { + return this; +} + bool Font::Describe(PP_FontDescription_Dev* description, PP_FontMetrics_Dev* metrics) { if (description->face.type != PP_VARTYPE_UNDEFINED) diff --git a/webkit/glue/plugins/pepper_font.h b/webkit/glue/plugins/pepper_font.h index 3cc001c..e9fdaff 100644 --- a/webkit/glue/plugins/pepper_font.h +++ b/webkit/glue/plugins/pepper_font.h @@ -27,7 +27,7 @@ class Font : public Resource { static const PPB_Font_Dev* GetInterface(); // Resource overrides. - Font* AsFont() { return this; } + virtual Font* AsFont(); // PPB_Font implementation. bool Describe(PP_FontDescription_Dev* description, diff --git a/webkit/glue/plugins/pepper_scrollbar.cc b/webkit/glue/plugins/pepper_scrollbar.cc index 2b96259..9b51c71 100644 --- a/webkit/glue/plugins/pepper_scrollbar.cc +++ b/webkit/glue/plugins/pepper_scrollbar.cc @@ -110,6 +110,10 @@ const PPB_Scrollbar_Dev* Scrollbar::GetInterface() { return &ppb_scrollbar; } +Scrollbar* Scrollbar::AsScrollbar() { + return this; +} + uint32_t Scrollbar::GetValue() { return scrollbar_->value(); } diff --git a/webkit/glue/plugins/pepper_scrollbar.h b/webkit/glue/plugins/pepper_scrollbar.h index c444bb3..817666e 100644 --- a/webkit/glue/plugins/pepper_scrollbar.h +++ b/webkit/glue/plugins/pepper_scrollbar.h @@ -27,7 +27,7 @@ class Scrollbar : public Widget, public WebKit::WebScrollbarClient { static const PPB_Scrollbar_Dev* GetInterface(); // Resource overrides. - Scrollbar* AsScrollbar() { return this; } + virtual Scrollbar* AsScrollbar(); // PPB_Scrollbar implementation. uint32_t GetValue(); diff --git a/webkit/glue/plugins/pepper_url_loader.cc b/webkit/glue/plugins/pepper_url_loader.cc index 2d94172..83da95f 100644 --- a/webkit/glue/plugins/pepper_url_loader.cc +++ b/webkit/glue/plugins/pepper_url_loader.cc @@ -214,6 +214,10 @@ const PPB_URLLoaderTrusted* URLLoader::GetTrustedInterface() { return &ppb_urlloadertrusted; } +URLLoader* URLLoader::AsURLLoader() { + return this; +} + int32_t URLLoader::Open(URLRequestInfo* request, PP_CompletionCallback callback) { if (loader_.get()) diff --git a/webkit/glue/plugins/pepper_url_loader.h b/webkit/glue/plugins/pepper_url_loader.h index ee8ddd7..f39a94dd 100644 --- a/webkit/glue/plugins/pepper_url_loader.h +++ b/webkit/glue/plugins/pepper_url_loader.h @@ -44,7 +44,7 @@ class URLLoader : public Resource, static const PPB_URLLoaderTrusted* GetTrustedInterface(); // Resource overrides. - URLLoader* AsURLLoader() { return this; } + virtual URLLoader* AsURLLoader(); // PPB_URLLoader implementation. int32_t Open(URLRequestInfo* request, PP_CompletionCallback callback); @@ -82,7 +82,7 @@ class URLLoader : public Resource, const WebKit::WebURLError& error); // PluginInstance::Observer implementation. - void InstanceDestroyed(PluginInstance* instance); + virtual void InstanceDestroyed(PluginInstance* instance); URLResponseInfo* response_info() const { return response_info_; } diff --git a/webkit/glue/plugins/pepper_url_request_info.cc b/webkit/glue/plugins/pepper_url_request_info.cc index f606509..228f124 100644 --- a/webkit/glue/plugins/pepper_url_request_info.cc +++ b/webkit/glue/plugins/pepper_url_request_info.cc @@ -168,6 +168,10 @@ const PPB_URLRequestInfo* URLRequestInfo::GetInterface() { return &ppb_urlrequestinfo; } +URLRequestInfo* URLRequestInfo::AsURLRequestInfo() { + return this; +} + bool URLRequestInfo::SetBooleanProperty(PP_URLRequestProperty property, bool value) { switch (property) { diff --git a/webkit/glue/plugins/pepper_url_request_info.h b/webkit/glue/plugins/pepper_url_request_info.h index 7aa9fc1..207285e 100644 --- a/webkit/glue/plugins/pepper_url_request_info.h +++ b/webkit/glue/plugins/pepper_url_request_info.h @@ -30,7 +30,7 @@ class URLRequestInfo : public Resource { static const PPB_URLRequestInfo* GetInterface(); // Resource overrides. - URLRequestInfo* AsURLRequestInfo() { return this; } + virtual URLRequestInfo* AsURLRequestInfo(); // PPB_URLRequestInfo implementation. bool SetBooleanProperty(PP_URLRequestProperty property, bool value); diff --git a/webkit/glue/plugins/pepper_url_response_info.cc b/webkit/glue/plugins/pepper_url_response_info.cc index 5ae484f..47fa51a 100644 --- a/webkit/glue/plugins/pepper_url_response_info.cc +++ b/webkit/glue/plugins/pepper_url_response_info.cc @@ -92,6 +92,10 @@ const PPB_URLResponseInfo* URLResponseInfo::GetInterface() { return &ppb_urlresponseinfo; } +URLResponseInfo* URLResponseInfo::AsURLResponseInfo() { + return this; +} + PP_Var URLResponseInfo::GetProperty(PP_URLResponseProperty property) { switch (property) { case PP_URLRESPONSEPROPERTY_URL: diff --git a/webkit/glue/plugins/pepper_url_response_info.h b/webkit/glue/plugins/pepper_url_response_info.h index adbf8ef..fa5f972 100644 --- a/webkit/glue/plugins/pepper_url_response_info.h +++ b/webkit/glue/plugins/pepper_url_response_info.h @@ -26,7 +26,7 @@ class URLResponseInfo : public Resource { static const PPB_URLResponseInfo* GetInterface(); // Resource overrides. - URLResponseInfo* AsURLResponseInfo() { return this; } + virtual URLResponseInfo* AsURLResponseInfo(); // PPB_URLResponseInfo implementation. PP_Var GetProperty(PP_URLResponseProperty property); diff --git a/webkit/glue/plugins/pepper_video_decoder.cc b/webkit/glue/plugins/pepper_video_decoder.cc index cd4d3b5..034974b 100644 --- a/webkit/glue/plugins/pepper_video_decoder.cc +++ b/webkit/glue/plugins/pepper_video_decoder.cc @@ -106,6 +106,10 @@ const PPB_VideoDecoder_Dev* VideoDecoder::GetInterface() { return &ppb_videodecoder; } +VideoDecoder* VideoDecoder::AsVideoDecoder() { + return this; +} + bool VideoDecoder::Init(const PP_VideoDecoderConfig_Dev& decoder_config) { if (!instance()) return false; diff --git a/webkit/glue/plugins/pepper_video_decoder.h b/webkit/glue/plugins/pepper_video_decoder.h index c828709..7a161e62 100644 --- a/webkit/glue/plugins/pepper_video_decoder.h +++ b/webkit/glue/plugins/pepper_video_decoder.h @@ -28,7 +28,7 @@ class VideoDecoder : public Resource { static const PPB_VideoDecoder_Dev* GetInterface(); // Resource overrides. - VideoDecoder* AsVideoDecoder() { return this; } + virtual VideoDecoder* AsVideoDecoder(); PluginInstance* instance() { return instance_.get(); } diff --git a/webkit/glue/plugins/pepper_widget.cc b/webkit/glue/plugins/pepper_widget.cc index e704e8c..9fc762b 100644 --- a/webkit/glue/plugins/pepper_widget.cc +++ b/webkit/glue/plugins/pepper_widget.cc @@ -73,6 +73,10 @@ const PPB_Widget_Dev* Widget::GetInterface() { return &ppb_widget; } +Widget* Widget::AsWidget() { + return this; +} + bool Widget::GetLocation(PP_Rect* location) { *location = location_; return true; diff --git a/webkit/glue/plugins/pepper_widget.h b/webkit/glue/plugins/pepper_widget.h index cf937bd..55d0650 100644 --- a/webkit/glue/plugins/pepper_widget.h +++ b/webkit/glue/plugins/pepper_widget.h @@ -27,7 +27,7 @@ class Widget : public Resource { static const PPB_Widget_Dev* GetInterface(); // Resource overrides. - Widget* AsWidget() { return this; } + virtual Widget* AsWidget(); // PPB_Widget implementation. virtual bool Paint(const PP_Rect* rect, ImageData* image) = 0; diff --git a/webkit/glue/plugins/plugin_stream_url.cc b/webkit/glue/plugins/plugin_stream_url.cc index 1af4485..a16845b 100644 --- a/webkit/glue/plugins/plugin_stream_url.cc +++ b/webkit/glue/plugins/plugin_stream_url.cc @@ -106,6 +106,14 @@ void PluginStreamUrl::DidFail() { Close(NPRES_NETWORK_ERR); } +bool PluginStreamUrl::IsMultiByteResponseExpected() { + return seekable(); +} + +int PluginStreamUrl::ResourceId() { + return id_; +} + void PluginStreamUrl::CancelRequest() { if (id_ > 0) { if (instance()->webplugin()) { diff --git a/webkit/glue/plugins/plugin_stream_url.h b/webkit/glue/plugins/plugin_stream_url.h index 8c03edc..3fdbe17 100644 --- a/webkit/glue/plugins/plugin_stream_url.h +++ b/webkit/glue/plugins/plugin_stream_url.h @@ -43,21 +43,17 @@ class PluginStreamUrl : public PluginStream, // // WebPluginResourceClient methods // - void WillSendRequest(const GURL& url, int http_status_code); - void DidReceiveResponse(const std::string& mime_type, - const std::string& headers, - uint32 expected_length, - uint32 last_modified, - bool request_is_seekable); - void DidReceiveData(const char* buffer, int length, int data_offset); - void DidFinishLoading(); - void DidFail(); - bool IsMultiByteResponseExpected() { - return seekable(); - } - int ResourceId() { - return id_; - } + virtual void WillSendRequest(const GURL& url, int http_status_code); + virtual void DidReceiveResponse(const std::string& mime_type, + const std::string& headers, + uint32 expected_length, + uint32 last_modified, + bool request_is_seekable); + virtual void DidReceiveData(const char* buffer, int length, int data_offset); + virtual void DidFinishLoading(); + virtual void DidFail(); + virtual bool IsMultiByteResponseExpected(); + virtual int ResourceId(); private: GURL url_; diff --git a/webkit/glue/plugins/webplugin_impl.h b/webkit/glue/plugins/webplugin_impl.h index 4f3b6c7..d319df1 100644 --- a/webkit/glue/plugins/webplugin_impl.h +++ b/webkit/glue/plugins/webplugin_impl.h @@ -104,11 +104,11 @@ class WebPluginImpl : public WebPlugin, virtual void stopFind(); // WebPlugin implementation: - void SetWindow(gfx::PluginWindowHandle window); + virtual void SetWindow(gfx::PluginWindowHandle window); virtual void SetAcceptsInputEvents(bool accepts) { accepts_input_events_ = accepts; } - void WillDestroyWindow(gfx::PluginWindowHandle window); + virtual void WillDestroyWindow(gfx::PluginWindowHandle window); #if defined(OS_WIN) void SetWindowlessPumpEvent(HANDLE pump_messages_event) { } #endif @@ -220,24 +220,24 @@ class WebPluginImpl : public WebPlugin, // request given a handle. void RemoveClient(WebKit::WebURLLoader* loader); - 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 CancelDocumentLoad(); + virtual void CancelDocumentLoad(); - void InitiateHTTPRangeRequest( + virtual void InitiateHTTPRangeRequest( const char* url, const char* range_info, int pending_request_id); - void SetDeferResourceLoading(unsigned long resource_id, bool defer); + virtual void SetDeferResourceLoading(unsigned long resource_id, bool defer); // Ignore in-process plugins mode for this flag. - bool IsOffTheRecord() { return false; } + virtual bool IsOffTheRecord() { return false; } // Handles HTTP multipart responses, i.e. responses received with a HTTP // status code of 206. |