summaryrefslogtreecommitdiffstats
path: root/chrome/renderer
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-22 17:28:43 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-22 17:28:43 +0000
commit38e0898607eea03649b7b07e9cf890af7dc33ac7 (patch)
tree6ac95fd496661a6e0718c349bba089144e0fef09 /chrome/renderer
parent2a9662e31f18f77b856487b7266c70ccede557e0 (diff)
downloadchromium_src-38e0898607eea03649b7b07e9cf890af7dc33ac7.zip
chromium_src-38e0898607eea03649b7b07e9cf890af7dc33ac7.tar.gz
chromium_src-38e0898607eea03649b7b07e9cf890af7dc33ac7.tar.bz2
FBTF: More dtor deinlining. (Can almost see the end!)
BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3962004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63527 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r--chrome/renderer/extensions/bindings_utils.cc20
-rw-r--r--chrome/renderer/extensions/bindings_utils.h20
-rw-r--r--chrome/renderer/form_manager.cc6
-rw-r--r--chrome/renderer/form_manager.h6
-rw-r--r--chrome/renderer/gpu_video_decoder_host.cc2
-rw-r--r--chrome/renderer/gpu_video_decoder_host.h2
-rw-r--r--chrome/renderer/paint_aggregator.cc4
-rw-r--r--chrome/renderer/paint_aggregator.h10
-rw-r--r--chrome/renderer/pepper_devices.cc25
-rw-r--r--chrome/renderer/pepper_devices.h24
-rw-r--r--chrome/renderer/pepper_plugin_delegate_impl.cc2
-rw-r--r--chrome/renderer/pepper_plugin_delegate_impl.h2
-rw-r--r--chrome/renderer/user_script_slave.cc2
-rw-r--r--chrome/renderer/user_script_slave.h1
-rw-r--r--chrome/renderer/websharedworkerrepository_impl.cc4
-rw-r--r--chrome/renderer/websharedworkerrepository_impl.h3
16 files changed, 90 insertions, 43 deletions
diff --git a/chrome/renderer/extensions/bindings_utils.cc b/chrome/renderer/extensions/bindings_utils.cc
index 2ddbefa..83ddeee 100644
--- a/chrome/renderer/extensions/bindings_utils.cc
+++ b/chrome/renderer/extensions/bindings_utils.cc
@@ -56,6 +56,19 @@ v8::Handle<v8::Value> ExtensionBase::GetChromeHidden(
return hidden;
}
+ContextInfo::ContextInfo(v8::Persistent<v8::Context> context,
+ const std::string& extension_id,
+ WebKit::WebFrame* parent_frame,
+ RenderView* render_view)
+ : context(context),
+ extension_id(extension_id),
+ parent_frame(parent_frame),
+ render_view(render_view),
+ num_connected_events(0) {
+}
+
+ContextInfo::~ContextInfo() {}
+
ContextList& GetContexts() {
return Singleton<SingletonData>::get()->contexts;
}
@@ -87,6 +100,13 @@ ContextInfo* GetInfoForCurrentContext() {
return context_iter->get();
}
+PendingRequest::PendingRequest(v8::Persistent<v8::Context> context,
+ const std::string& name)
+ : context(context), name(name) {
+}
+
+PendingRequest::~PendingRequest() {}
+
ContextList::iterator FindContext(v8::Handle<v8::Context> context) {
ContextList& all_contexts = GetContexts();
diff --git a/chrome/renderer/extensions/bindings_utils.h b/chrome/renderer/extensions/bindings_utils.h
index b269ad1..97973a9 100644
--- a/chrome/renderer/extensions/bindings_utils.h
+++ b/chrome/renderer/extensions/bindings_utils.h
@@ -67,6 +67,12 @@ const char* GetStringResource() {
// Contains information about a single javascript context.
struct ContextInfo {
+ ContextInfo(v8::Persistent<v8::Context> context,
+ const std::string& extension_id,
+ WebKit::WebFrame* parent_frame,
+ RenderView* render_view);
+ ~ContextInfo();
+
v8::Persistent<v8::Context> context;
std::string extension_id; // empty if the context is not an extension
@@ -85,14 +91,6 @@ struct ContextInfo {
// A count of the number of events that are listening in this context. When
// this is zero, |context| will be a weak handle.
int num_connected_events;
-
- ContextInfo(v8::Persistent<v8::Context> context,
- const std::string& extension_id,
- WebKit::WebFrame* parent_frame,
- RenderView* render_view)
- : context(context), extension_id(extension_id),
- parent_frame(parent_frame), render_view(render_view),
- num_connected_events(0) {}
};
typedef std::list< linked_ptr<ContextInfo> > ContextList;
@@ -113,9 +111,9 @@ ContextInfo* GetInfoForCurrentContext();
// Contains info relevant to a pending API request.
struct PendingRequest {
public :
- PendingRequest(v8::Persistent<v8::Context> context, const std::string& name)
- : context(context), name(name) {
- }
+ PendingRequest(v8::Persistent<v8::Context> context, const std::string& name);
+ ~PendingRequest();
+
v8::Persistent<v8::Context> context;
std::string name;
};
diff --git a/chrome/renderer/form_manager.cc b/chrome/renderer/form_manager.cc
index 9c49fd6..851eea4 100644
--- a/chrome/renderer/form_manager.cc
+++ b/chrome/renderer/form_manager.cc
@@ -237,6 +237,12 @@ void GetOptionStringsFromElement(WebFormControlElement element,
} // namespace
+struct FormManager::FormElement {
+ WebKit::WebFormElement form_element;
+ std::vector<WebKit::WebFormControlElement> control_elements;
+ std::vector<string16> control_values;
+};
+
FormManager::FormManager() {
}
diff --git a/chrome/renderer/form_manager.h b/chrome/renderer/form_manager.h
index a8643d9..3e4b834 100644
--- a/chrome/renderer/form_manager.h
+++ b/chrome/renderer/form_manager.h
@@ -115,11 +115,7 @@ class FormManager {
// Stores the WebFormElement and the form control elements for a form.
// Original form values are stored so when we clear a form we can reset
// "select-one" values to their original state.
- struct FormElement {
- WebKit::WebFormElement form_element;
- std::vector<WebKit::WebFormControlElement> control_elements;
- std::vector<string16> control_values;
- };
+ struct FormElement;
// Type for cache of FormElement objects.
typedef std::vector<FormElement*> FormElementList;
diff --git a/chrome/renderer/gpu_video_decoder_host.cc b/chrome/renderer/gpu_video_decoder_host.cc
index bf6c79f..44599f3 100644
--- a/chrome/renderer/gpu_video_decoder_host.cc
+++ b/chrome/renderer/gpu_video_decoder_host.cc
@@ -26,6 +26,8 @@ GpuVideoDecoderHost::GpuVideoDecoderHost(MessageRouter* router,
memset(&config_, 0, sizeof(config_));
}
+GpuVideoDecoderHost::~GpuVideoDecoderHost() {}
+
void GpuVideoDecoderHost::OnChannelError() {
ipc_sender_ = NULL;
}
diff --git a/chrome/renderer/gpu_video_decoder_host.h b/chrome/renderer/gpu_video_decoder_host.h
index baf0ffe..c32a9f0 100644
--- a/chrome/renderer/gpu_video_decoder_host.h
+++ b/chrome/renderer/gpu_video_decoder_host.h
@@ -45,7 +45,7 @@ class GpuVideoDecoderHost : public media::VideoDecodeEngine,
IPC::Message::Sender* ipc_sender,
int context_route_id,
int32 decoder_host_id);
- virtual ~GpuVideoDecoderHost() {}
+ virtual ~GpuVideoDecoderHost();
// IPC::Channel::Listener.
virtual void OnChannelConnected(int32 peer_pid) {}
diff --git a/chrome/renderer/paint_aggregator.cc b/chrome/renderer/paint_aggregator.cc
index 943e012..991053f 100644
--- a/chrome/renderer/paint_aggregator.cc
+++ b/chrome/renderer/paint_aggregator.cc
@@ -34,6 +34,10 @@ static const float kMaxRedundantPaintToScrollArea = 0.8f;
// a paint rect can be significant.
static const size_t kMaxPaintRects = 5;
+PaintAggregator::PendingUpdate::PendingUpdate() {}
+
+PaintAggregator::PendingUpdate::~PendingUpdate() {}
+
gfx::Rect PaintAggregator::PendingUpdate::GetScrollDamage() const {
// Should only be scrolling in one direction at a time.
DCHECK(!(scroll_delta.x() && scroll_delta.y()));
diff --git a/chrome/renderer/paint_aggregator.h b/chrome/renderer/paint_aggregator.h
index 6efac35..119e0b5 100644
--- a/chrome/renderer/paint_aggregator.h
+++ b/chrome/renderer/paint_aggregator.h
@@ -8,6 +8,7 @@
#include <vector>
+#include "base/basictypes.h"
#include "gfx/rect.h"
// This class is responsible for aggregating multiple invalidation and scroll
@@ -22,9 +23,8 @@ class PaintAggregator {
// |scroll_delta| can only specify scrolling in one direction (i.e., the x
// and y members cannot both be non-zero).
struct PendingUpdate {
- gfx::Point scroll_delta;
- gfx::Rect scroll_rect;
- std::vector<gfx::Rect> paint_rects;
+ PendingUpdate();
+ ~PendingUpdate();
// Returns the rect damaged by scrolling within |scroll_rect| by
// |scroll_delta|. This rect must be repainted.
@@ -32,6 +32,10 @@ class PaintAggregator {
// Returns the smallest rect containing all paint rects.
gfx::Rect GetPaintBounds() const;
+
+ gfx::Point scroll_delta;
+ gfx::Rect scroll_rect;
+ std::vector<gfx::Rect> paint_rects;
};
// There is a PendingUpdate if InvalidateRect or ScrollRect were called and
diff --git a/chrome/renderer/pepper_devices.cc b/chrome/renderer/pepper_devices.cc
index 07da49d..57189d4 100644
--- a/chrome/renderer/pepper_devices.cc
+++ b/chrome/renderer/pepper_devices.cc
@@ -20,11 +20,30 @@ const uint32 kBytesPerPixel = 4; // Only 8888 RGBA for now.
int Graphics2DDeviceContext::next_buffer_id_ = 0;
+struct Graphics2DDeviceContext::FlushCallbackData {
+ FlushCallbackData(NPDeviceFlushContextCallbackPtr f,
+ NPP n,
+ NPDeviceContext2D* c,
+ NPUserData* u)
+ : function(f),
+ npp(n),
+ context(c),
+ user_data(u) {
+ }
+
+ NPDeviceFlushContextCallbackPtr function;
+ NPP npp;
+ NPDeviceContext2D* context;
+ NPUserData* user_data;
+};
+
Graphics2DDeviceContext::Graphics2DDeviceContext(
WebPluginDelegatePepper* plugin_delegate)
: plugin_delegate_(plugin_delegate) {
}
+Graphics2DDeviceContext::~Graphics2DDeviceContext() {}
+
NPError Graphics2DDeviceContext::Initialize(
gfx::Rect window_rect, const NPDeviceContext2DConfig* config,
NPDeviceContext2D* context) {
@@ -153,6 +172,12 @@ void Graphics2DDeviceContext::RenderViewFlushedPaint() {
painted_flush_callbacks_.clear();
}
+AudioDeviceContext::AudioDeviceContext()
+ : context_(NULL),
+ stream_id_(0),
+ shared_memory_size_(0) {
+}
+
AudioDeviceContext::~AudioDeviceContext() {
if (stream_id_) {
OnDestroy();
diff --git a/chrome/renderer/pepper_devices.h b/chrome/renderer/pepper_devices.h
index 2a72f4e..912657a 100644
--- a/chrome/renderer/pepper_devices.h
+++ b/chrome/renderer/pepper_devices.h
@@ -27,6 +27,7 @@ class SkBitmap;
class Graphics2DDeviceContext {
public:
explicit Graphics2DDeviceContext(WebPluginDelegatePepper* plugin_delegate);
+ ~Graphics2DDeviceContext();
NPError Initialize(gfx::Rect window_rect,
const NPDeviceContext2DConfig* config,
@@ -45,22 +46,7 @@ class Graphics2DDeviceContext {
skia::PlatformCanvas* canvas() { return canvas_.get(); }
private:
- struct FlushCallbackData {
- FlushCallbackData(NPDeviceFlushContextCallbackPtr f,
- NPP n,
- NPDeviceContext2D* c,
- NPUserData* u)
- : function(f),
- npp(n),
- context(c),
- user_data(u) {
- }
-
- NPDeviceFlushContextCallbackPtr function;
- NPP npp;
- NPDeviceContext2D* context;
- NPUserData* user_data;
- };
+ struct FlushCallbackData;
typedef std::vector<FlushCallbackData> FlushCallbackVector;
WebPluginDelegatePepper* plugin_delegate_;
@@ -97,11 +83,7 @@ class Graphics2DDeviceContext {
class AudioDeviceContext : public AudioMessageFilter::Delegate,
public base::DelegateSimpleThread::Delegate {
public:
- explicit AudioDeviceContext()
- : context_(NULL),
- stream_id_(0),
- shared_memory_size_(0) {
- }
+ explicit AudioDeviceContext();
virtual ~AudioDeviceContext();
NPError Initialize(AudioMessageFilter* filter,
diff --git a/chrome/renderer/pepper_plugin_delegate_impl.cc b/chrome/renderer/pepper_plugin_delegate_impl.cc
index cb37c0b..ecaf0e4 100644
--- a/chrome/renderer/pepper_plugin_delegate_impl.cc
+++ b/chrome/renderer/pepper_plugin_delegate_impl.cc
@@ -495,6 +495,8 @@ PepperPluginDelegateImpl::PepperPluginDelegateImpl(RenderView* render_view)
id_generator_(0) {
}
+PepperPluginDelegateImpl::~PepperPluginDelegateImpl() {}
+
void PepperPluginDelegateImpl::ViewInitiatedPaint() {
// Notify all of our instances that we started painting. This is used for
// internal bookkeeping only, so we know that the set can not change under
diff --git a/chrome/renderer/pepper_plugin_delegate_impl.h b/chrome/renderer/pepper_plugin_delegate_impl.h
index fc1c5b8..a1fb6a0 100644
--- a/chrome/renderer/pepper_plugin_delegate_impl.h
+++ b/chrome/renderer/pepper_plugin_delegate_impl.h
@@ -40,7 +40,7 @@ class PepperPluginDelegateImpl
public base::SupportsWeakPtr<PepperPluginDelegateImpl> {
public:
explicit PepperPluginDelegateImpl(RenderView* render_view);
- virtual ~PepperPluginDelegateImpl() {}
+ virtual ~PepperPluginDelegateImpl();
// Called by RenderView to tell us about painting events, these two functions
// just correspond to the DidInitiatePaint and DidFlushPaint in R.V..
diff --git a/chrome/renderer/user_script_slave.cc b/chrome/renderer/user_script_slave.cc
index 8639d43..dba1dcf 100644
--- a/chrome/renderer/user_script_slave.cc
+++ b/chrome/renderer/user_script_slave.cc
@@ -67,6 +67,8 @@ UserScriptSlave::UserScriptSlave()
IDR_GREASEMONKEY_API_JS);
}
+UserScriptSlave::~UserScriptSlave() {}
+
void UserScriptSlave::GetActiveExtensions(
std::set<std::string>* extension_ids) {
for (size_t i = 0; i < scripts_.size(); ++i) {
diff --git a/chrome/renderer/user_script_slave.h b/chrome/renderer/user_script_slave.h
index 7df6b17..23acb4c 100644
--- a/chrome/renderer/user_script_slave.h
+++ b/chrome/renderer/user_script_slave.h
@@ -27,6 +27,7 @@ using WebKit::WebScriptSource;
class UserScriptSlave {
public:
UserScriptSlave();
+ ~UserScriptSlave();
// Returns the unique set of extension IDs this UserScriptSlave knows about.
void GetActiveExtensions(std::set<std::string>* extension_ids);
diff --git a/chrome/renderer/websharedworkerrepository_impl.cc b/chrome/renderer/websharedworkerrepository_impl.cc
index 99f2a3b..29c9ed6 100644
--- a/chrome/renderer/websharedworkerrepository_impl.cc
+++ b/chrome/renderer/websharedworkerrepository_impl.cc
@@ -8,6 +8,10 @@
#include "chrome/renderer/render_thread.h"
#include "chrome/renderer/websharedworker_proxy.h"
+WebSharedWorkerRepositoryImpl::WebSharedWorkerRepositoryImpl() {}
+
+WebSharedWorkerRepositoryImpl::~WebSharedWorkerRepositoryImpl() {}
+
void WebSharedWorkerRepositoryImpl::addSharedWorker(
WebKit::WebSharedWorker* worker, DocumentID document) {
shared_worker_parents_.insert(document);
diff --git a/chrome/renderer/websharedworkerrepository_impl.h b/chrome/renderer/websharedworkerrepository_impl.h
index b11e4a7..1bcbfa9 100644
--- a/chrome/renderer/websharedworkerrepository_impl.h
+++ b/chrome/renderer/websharedworkerrepository_impl.h
@@ -16,7 +16,8 @@ class WebSharedWorker;
class WebSharedWorkerRepositoryImpl : public WebKit::WebSharedWorkerRepository {
public:
- virtual ~WebSharedWorkerRepositoryImpl() {}
+ WebSharedWorkerRepositoryImpl();
+ virtual ~WebSharedWorkerRepositoryImpl();
virtual void addSharedWorker(WebKit::WebSharedWorker*, DocumentID document);
virtual void documentDetached(DocumentID document);