summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/render_view.h
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-03 05:03:22 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-03 05:03:22 +0000
commit396c3a461549b02dcb830a287ac4656b2ca181e7 (patch)
treedfd70c68c3fc4aa501a8f1bf13bf4853d2f7faef /chrome/renderer/render_view.h
parent29a694916746e366724f7ac6f9aa0d103894f4a9 (diff)
downloadchromium_src-396c3a461549b02dcb830a287ac4656b2ca181e7.zip
chromium_src-396c3a461549b02dcb830a287ac4656b2ca181e7.tar.gz
chromium_src-396c3a461549b02dcb830a287ac4656b2ca181e7.tar.bz2
Make the pepper 2D flush callback actually function as advertised. It will now
get called asynchronously when the bits are actually copied to the screen, rather than synchronously from inside the paint function. This makes it useful for plugins to use the callback for rate limiting. This also adds a lot of infrastructure for running tests on pepper devices, and includes a unit test for the new flush behavior. I made the existing RenderProcess object an abstract interface and made the existing MockProcess (renamed to be more clear) implement that. This avoids a static cast that would actually crash during a unit test because some code was hardcoded to expect a RenderProcess object. This fixes base's IDMap iterator which has apparently never been used for an IDMap with ownership semantics. TEST=Unit test included BUG=none Review URL: http://codereview.chromium.org/661124 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40490 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/render_view.h')
-rw-r--r--chrome/renderer/render_view.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h
index 797402f..b2233bb 100644
--- a/chrome/renderer/render_view.h
+++ b/chrome/renderer/render_view.h
@@ -76,7 +76,9 @@ class GeolocationDispatcher;
class GURL;
class ListValue;
class NavigationState;
+class PepperDeviceTest;
class PrintWebViewHelper;
+class WebPluginDelegatePepper;
class WebPluginDelegateProxy;
struct ContextMenuMediaParams;
struct ThumbnailScore;
@@ -439,6 +441,11 @@ class RenderView : public RenderWidget,
const std::string& css,
const std::string& id);
+ // Informs us that the given pepper plugin we created is being deleted the
+ // pointer must not be dereferenced as this is called from the destructor of
+ // the plugin.
+ void OnPepperPluginDestroy(WebPluginDelegatePepper* pepper_plugin);
+
// Whether content state (such as form state and scroll position) should be
// sent to the browser immediately. This is normally false, but set to true
// by some tests.
@@ -491,7 +498,8 @@ class RenderView : public RenderWidget,
virtual void Close();
virtual void OnResize(const gfx::Size& new_size,
const gfx::Rect& resizer_rect);
- virtual void DidPaint();
+ virtual void DidInitiatePaint();
+ virtual void DidFlushPaint();
virtual void DidHandleKeyEvent();
#if OS_MACOSX
virtual void OnSetFocus(bool enable);
@@ -502,6 +510,7 @@ class RenderView : public RenderWidget,
private:
// For unit tests.
friend class RenderViewTest;
+ friend class PepperDeviceTest;
FRIEND_TEST(RenderViewTest, OnLoadAlternateHTMLText);
FRIEND_TEST(RenderViewTest, OnNavStateChanged);
FRIEND_TEST(RenderViewTest, OnImeStateChanged);
@@ -1136,6 +1145,10 @@ class RenderView : public RenderWidget,
TextTranslatorImpl text_translator_;
scoped_ptr<PageTranslator> page_translator_;
+ // A list of all pepper plugins that we've created that haven't been
+ // destroyed yet.
+ std::set<WebPluginDelegatePepper*> current_pepper_plugins_;
+
// The FormManager for this RenderView.
FormManager form_manager_;