diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-20 05:23:36 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-20 05:23:36 +0000 |
commit | 514e711ea07b6a1aef47ebf20250a37bd632402c (patch) | |
tree | 632f5e8902cc4231e9c14d0ad28035d63a0c964d /chrome/renderer/render_widget.cc | |
parent | 4acbad918766b81f1da3f10e2ae8aa2b10bb0593 (diff) | |
download | chromium_src-514e711ea07b6a1aef47ebf20250a37bd632402c.zip chromium_src-514e711ea07b6a1aef47ebf20250a37bd632402c.tar.gz chromium_src-514e711ea07b6a1aef47ebf20250a37bd632402c.tar.bz2 |
Refactor code from RenderThread and PluginThread and move it to ChildThread. ChildProcess now owns the ChildThread, which removes duplicate code and simplifies things.
Clean up ChildProcess, there really was no need for all the templates and statics in it and its subclasses.
Review URL: http://codereview.chromium.org/21502
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10080 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/render_widget.cc')
-rw-r--r-- | chrome/renderer/render_widget.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/chrome/renderer/render_widget.cc b/chrome/renderer/render_widget.cc index 7782fd5..9d1d3a3 100644 --- a/chrome/renderer/render_widget.cc +++ b/chrome/renderer/render_widget.cc @@ -98,21 +98,21 @@ RenderWidget::RenderWidget(RenderThreadBase* render_thread, bool activatable) ime_control_updated_(false), ime_control_busy_(false), activatable_(activatable) { - RenderProcess::AddRefProcess(); + RenderProcess::current()->AddRefProcess(); DCHECK(render_thread_); } RenderWidget::~RenderWidget() { DCHECK(!webwidget_) << "Leaking our WebWidget!"; if (current_paint_buf_) { - RenderProcess::ReleaseTransportDIB(current_paint_buf_); + RenderProcess::current()->ReleaseTransportDIB(current_paint_buf_); current_paint_buf_ = NULL; } if (current_scroll_buf_) { - RenderProcess::ReleaseTransportDIB(current_scroll_buf_); + RenderProcess::current()->ReleaseTransportDIB(current_scroll_buf_); current_scroll_buf_ = NULL; } - RenderProcess::ReleaseProcess(); + RenderProcess::current()->ReleaseProcess(); } /*static*/ @@ -298,7 +298,7 @@ void RenderWidget::OnPaintRectAck() { // If we sent a PaintRect message with a zero-sized bitmap, then // we should have no current paint buf. if (current_paint_buf_) { - RenderProcess::ReleaseTransportDIB(current_paint_buf_); + RenderProcess::current()->ReleaseTransportDIB(current_paint_buf_); current_paint_buf_ = NULL; } @@ -310,7 +310,7 @@ void RenderWidget::OnScrollRectAck() { DCHECK(scroll_reply_pending()); if (current_scroll_buf_) { - RenderProcess::ReleaseTransportDIB(current_scroll_buf_); + RenderProcess::current()->ReleaseTransportDIB(current_scroll_buf_); current_scroll_buf_ = NULL; } @@ -403,7 +403,7 @@ void RenderWidget::DoDeferredPaint() { // Compute a buffer for painting and cache it. skia::PlatformCanvas* canvas = - RenderProcess::GetDrawingCanvas(¤t_paint_buf_, damaged_rect); + RenderProcess::current()->GetDrawingCanvas(¤t_paint_buf_, damaged_rect); if (!canvas) { NOTREACHED(); return; @@ -480,7 +480,7 @@ void RenderWidget::DoDeferredScroll() { damaged_rect = scroll_rect_.Intersect(damaged_rect); skia::PlatformCanvas* canvas = - RenderProcess::GetDrawingCanvas(¤t_scroll_buf_, damaged_rect); + RenderProcess::current()->GetDrawingCanvas(¤t_scroll_buf_, damaged_rect); if (!canvas) { NOTREACHED(); return; |