Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2614)

Unified Diff: chrome/browser/renderer_host/render_widget_host.h

Issue 118420: Adds kind-of-live thumbnail generation for a potential tab switcher. This... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/renderer_host/backing_store_x.cc ('k') | chrome/browser/renderer_host/render_widget_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/render_widget_host.h
===================================================================
--- chrome/browser/renderer_host/render_widget_host.h (revision 17971)
+++ chrome/browser/renderer_host/render_widget_host.h (working copy)
@@ -14,6 +14,7 @@
#include "base/timer.h"
#include "chrome/common/ipc_channel.h"
#include "chrome/common/native_web_keyboard_event.h"
+#include "chrome/common/property_bag.h"
#include "testing/gtest/include/gtest/gtest_prod.h"
#include "webkit/glue/webtextdirection.h"
@@ -31,6 +32,7 @@
class PaintObserver;
class RenderProcessHost;
class RenderWidgetHostView;
+class RenderWidgetHostPaintingObserver;
class TransportDIB;
class WebCursor;
struct ViewHostMsg_PaintRect_Params;
@@ -140,6 +142,22 @@
paint_observer_.reset(paint_observer);
}
+ // Returns the property bag for this widget, where callers can add extra data
+ // they may wish to associate with it. Returns a pointer rather than a
+ // reference since the PropertyAccessors expect this.
+ const PropertyBag* property_bag() const { return &property_bag_; }
+ PropertyBag* property_bag() { return &property_bag_; }
+
+ // The painting observer that will be called for paint events. This
+ // pointer's ownership will remain with the caller and must remain valid
+ // until this class is destroyed or the observer is replaced.
+ RenderWidgetHostPaintingObserver* painting_observer() const {
+ return painting_observer_;
+ }
+ void set_painting_observer(RenderWidgetHostPaintingObserver* observer) {
+ painting_observer_ = observer;
+ }
+
// Called when a renderer object already been created for this host, and we
// just need to be attached to it. Used for window.open, <select> dropdown
// menus, and other times when the renderer initiates creating an object.
@@ -177,9 +195,11 @@
// Get access to the widget's backing store. If a resize is in progress,
// then the current size of the backing store may be less than the size of
- // the widget's view. This method returns NULL if the backing store could
- // not be created.
- BackingStore* GetBackingStore();
+ // the widget's view. If you pass |force_create| as true, then the backing
+ // store will be created if it doesn't exist. Otherwise, NULL will be returned
+ // if the backing store doesn't already exist. It will also return NULL if the
+ // backing store could not be created.
+ BackingStore* GetBackingStore(bool force_create);
// Allocate a new backing store of the given size. Returns NULL on failure
// (for example, if we don't currently have a RenderWidgetHostView.)
@@ -353,6 +373,13 @@
// renderer crashed, so you must always check that.
RenderProcessHost* process_;
+ // Stores random bits of data for others to associate with this object.
+ PropertyBag property_bag_;
+
+ // Observer that will be called for paint events. This may be NULL. The
+ // pointer is not owned by this class.
+ RenderWidgetHostPaintingObserver* painting_observer_;
+
// The ID of the corresponding object in the Renderer Instance.
int routing_id_;
« no previous file with comments | « chrome/browser/renderer_host/backing_store_x.cc ('k') | chrome/browser/renderer_host/render_widget_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698