diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-30 20:06:30 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-30 20:06:30 +0000 |
commit | 20f0487a5b73e8071af2612150301b0942cbf0e2 (patch) | |
tree | ecee69b28f16712bdc1558ac0a015ac80095c761 /webkit/glue | |
parent | 167b0dd17d5ed57ff293b6480ccaed706e0bc9cb (diff) | |
download | chromium_src-20f0487a5b73e8071af2612150301b0942cbf0e2.zip chromium_src-20f0487a5b73e8071af2612150301b0942cbf0e2.tar.gz chromium_src-20f0487a5b73e8071af2612150301b0942cbf0e2.tar.bz2 |
FBTF: Move ctors/dtors into implementation files. Adds ctors/dtors to non-POD structs.
Cuts ~2MB off our .a files (Debug, Linux). Also added the "virtual" keyword on
a whole bunch of virtual dtors that were missing it.
BUG=none
TEST=compiles
Review URL: http://codereview.chromium.org/3522004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61100 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r-- | webkit/glue/plugins/pepper_url_request_info.cc | 25 | ||||
-rw-r--r-- | webkit/glue/plugins/pepper_url_request_info.h | 26 | ||||
-rw-r--r-- | webkit/glue/plugins/plugin_list.cc | 3 | ||||
-rw-r--r-- | webkit/glue/plugins/plugin_list.h | 2 | ||||
-rw-r--r-- | webkit/glue/plugins/webplugin_impl.cc | 9 | ||||
-rw-r--r-- | webkit/glue/plugins/webplugin_impl.h | 9 |
6 files changed, 41 insertions, 33 deletions
diff --git a/webkit/glue/plugins/pepper_url_request_info.cc b/webkit/glue/plugins/pepper_url_request_info.cc index 4edbe83..24348b7 100644 --- a/webkit/glue/plugins/pepper_url_request_info.cc +++ b/webkit/glue/plugins/pepper_url_request_info.cc @@ -123,6 +123,31 @@ const PPB_URLRequestInfo_Dev ppb_urlrequestinfo = { } // namespace +struct URLRequestInfo::BodyItem { + BodyItem(const std::string& data) + : data(data), + start_offset(0), + number_of_bytes(-1), + expected_last_modified_time(0.0) { + } + + BodyItem(FileRef* file_ref, + int64_t start_offset, + int64_t number_of_bytes, + PP_Time expected_last_modified_time) + : file_ref(file_ref), + start_offset(start_offset), + number_of_bytes(number_of_bytes), + expected_last_modified_time(expected_last_modified_time) { + } + + std::string data; + scoped_refptr<FileRef> file_ref; + int64_t start_offset; + int64_t number_of_bytes; + PP_Time expected_last_modified_time; +}; + URLRequestInfo::URLRequestInfo(PluginModule* module) : Resource(module), stream_to_file_(false) { diff --git a/webkit/glue/plugins/pepper_url_request_info.h b/webkit/glue/plugins/pepper_url_request_info.h index 7220531..2d394d5 100644 --- a/webkit/glue/plugins/pepper_url_request_info.h +++ b/webkit/glue/plugins/pepper_url_request_info.h @@ -45,31 +45,7 @@ class URLRequestInfo : public Resource { WebKit::WebURLRequest ToWebURLRequest(WebKit::WebFrame* frame) const; private: - struct BodyItem { - BodyItem(const std::string& data) - : data(data), - start_offset(0), - number_of_bytes(-1), - expected_last_modified_time(0.0) { - } - - BodyItem(FileRef* file_ref, - int64_t start_offset, - int64_t number_of_bytes, - PP_Time expected_last_modified_time) - : file_ref(file_ref), - start_offset(start_offset), - number_of_bytes(number_of_bytes), - expected_last_modified_time(expected_last_modified_time) { - } - - std::string data; - scoped_refptr<FileRef> file_ref; - int64_t start_offset; - int64_t number_of_bytes; - PP_Time expected_last_modified_time; - }; - + struct BodyItem; typedef std::vector<BodyItem> Body; std::string url_; diff --git a/webkit/glue/plugins/plugin_list.cc b/webkit/glue/plugins/plugin_list.cc index 2f71d43..a8d0534 100644 --- a/webkit/glue/plugins/plugin_list.cc +++ b/webkit/glue/plugins/plugin_list.cc @@ -445,6 +445,9 @@ bool PluginList::EnablePlugin(const FilePath& filename) { return did_enable; } +PluginList::~PluginList() { +} + bool PluginList::DisablePlugin(const FilePath& filename) { AutoLock lock(lock_); diff --git a/webkit/glue/plugins/plugin_list.h b/webkit/glue/plugins/plugin_list.h index 36d8941..c0108ef 100644 --- a/webkit/glue/plugins/plugin_list.h +++ b/webkit/glue/plugins/plugin_list.h @@ -164,6 +164,8 @@ class PluginList { // will be disabled. bool DisablePlugin(const FilePath& filename); + ~PluginList(); + private: // Constructors are private for singletons PluginList(); diff --git a/webkit/glue/plugins/webplugin_impl.cc b/webkit/glue/plugins/webplugin_impl.cc index 80bc197..704145b 100644 --- a/webkit/glue/plugins/webplugin_impl.cc +++ b/webkit/glue/plugins/webplugin_impl.cc @@ -4,6 +4,7 @@ #include "webkit/glue/plugins/webplugin_impl.h" +#include "base/linked_ptr.h" #include "base/logging.h" #include "base/message_loop.h" #include "base/string_util.h" @@ -207,6 +208,14 @@ void GetResponseInfo(const WebURLResponse& response, // WebKit::WebPlugin ---------------------------------------------------------- +struct WebPluginImpl::ClientInfo { + unsigned long id; + WebPluginResourceClient* client; + WebKit::WebURLRequest request; + bool pending_failure_notification; + linked_ptr<WebKit::WebURLLoader> loader; +}; + bool WebPluginImpl::initialize(WebPluginContainer* container) { if (!page_delegate_) return false; diff --git a/webkit/glue/plugins/webplugin_impl.h b/webkit/glue/plugins/webplugin_impl.h index 5fe96d2..cb0970b 100644 --- a/webkit/glue/plugins/webplugin_impl.h +++ b/webkit/glue/plugins/webplugin_impl.h @@ -11,7 +11,6 @@ #include "base/basictypes.h" #include "base/file_path.h" -#include "base/linked_ptr.h" #include "base/task.h" #include "base/weak_ptr.h" #include "gfx/native_widget_types.h" @@ -256,13 +255,7 @@ class WebPluginImpl : public WebPlugin, // Delayed task for downloading the plugin source URL. void OnDownloadPluginSrcUrl(); - struct ClientInfo { - unsigned long id; - WebPluginResourceClient* client; - WebKit::WebURLRequest request; - bool pending_failure_notification; - linked_ptr<WebKit::WebURLLoader> loader; - }; + struct ClientInfo; // Helper functions WebPluginResourceClient* GetClientFromLoader(WebKit::WebURLLoader* loader); |