Relanding with v8 fix.

Modify the RenderThread to track the number of widgets
and "hidden widgets" which are running through that thread.

By knowing the if the widgets are all hidden, the thread
can accurately inform V8 when it is idle so that V8 can
better cleanup unused memory when idle.

BUG=none
TEST=none
Review URL: http://codereview.chromium.org/173466

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24448 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/renderer/render_widget.h b/chrome/renderer/render_widget.h
index 7987d28..ae54a55 100644
--- a/chrome/renderer/render_widget.h
+++ b/chrome/renderer/render_widget.h
@@ -151,6 +151,11 @@
   // browser side has updated the screen for a newly painted region.
   virtual void DidPaint() {}
 
+  // Sets the "hidden" state of this widget.  All accesses to is_hidden_ should
+  // use this method so that we can properly inform the RenderThread of our
+  // state.
+  void SetHidden(bool hidden);
+
   // True if a PaintRect_ACK message is pending.
   bool paint_reply_pending() const {
     return paint_reply_pending_;