Index: content/browser/browser_plugin/test_browser_plugin_guest.h |
diff --git a/content/browser/browser_plugin/test_browser_plugin_guest.h b/content/browser/browser_plugin/test_browser_plugin_guest.h |
index 93167373af869aa58da1514f34355bbaf7626415..8e8cdf41326ead2e35fa33d9b3d459a86c7158bc 100644 |
--- a/content/browser/browser_plugin/test_browser_plugin_guest.h |
+++ b/content/browser/browser_plugin/test_browser_plugin_guest.h |
@@ -10,6 +10,7 @@ |
#include "content/browser/browser_plugin/browser_plugin_guest.h" |
#include "content/public/browser/notification_observer.h" |
#include "content/public/test/test_utils.h" |
+#include "ui/gfx/size.h" |
class WebContentsImpl; |
@@ -41,25 +42,31 @@ class TestBrowserPluginGuest : public BrowserPluginGuest, |
virtual bool ViewTakeFocus(bool reverse) OVERRIDE; |
virtual void Reload() OVERRIDE; |
virtual void Stop() OVERRIDE; |
+ virtual void SetDamageBuffer(TransportDIB* damage_buffer, |
+#if defined(OS_WIN) |
+ int damage_buffer_size, |
+#endif |
+ const gfx::Size& damage_view_size, |
+ float scale_factor) OVERRIDE; |
// Test utilities to wait for a event we are interested in. |
// Waits until UpdateRect message is sent from the guest, meaning it is |
// ready/rendered. |
void WaitForUpdateRectMsg(); |
void ResetUpdateRectCount(); |
- // Waits until UpdateRect message with a specific size is sent from the guest. |
- void WaitForUpdateRectMsgWithSize(int width, int height); |
+ // Waits until a guest receives a damage buffer of the specified |size|. |
+ void WaitForDamageBufferWithSize(const gfx::Size& size); |
// Waits for focus to reach this guest. |
void WaitForFocus(); |
- // Wait for focus to move out of this guest. |
+ // Waits for focus to move out of this guest. |
void WaitForAdvanceFocus(); |
- // Wait until the guest is hidden. |
+ // Waits until the guest is hidden. |
void WaitUntilHidden(); |
// Waits until guest crashes. |
void WaitForCrashed(); |
- // Wait until a reload request is observed. |
+ // Waits until a reload request is observed. |
void WaitForReload(); |
- // Wait until a stop request is observed. |
+ // Waits until a stop request is observed. |
void WaitForStop(); |
private: |
@@ -67,20 +74,19 @@ class TestBrowserPluginGuest : public BrowserPluginGuest, |
virtual void SendMessageToEmbedder(IPC::Message* msg) OVERRIDE; |
int update_rect_count_; |
+ int damage_buffer_call_count_; |
bool crash_observed_; |
bool focus_observed_; |
bool advance_focus_observed_; |
bool was_hidden_observed_; |
bool stop_observed_; |
bool reload_observed_; |
+ bool set_damage_buffer_observed_; |
- // For WaitForUpdateRectMsgWithSize(). |
- bool waiting_for_update_rect_msg_with_size_; |
- int expected_width_; |
- int expected_height_; |
- |
- int last_update_rect_width_; |
- int last_update_rect_height_; |
+ // For WaitForDamageBufferWithSize(). |
+ bool waiting_for_damage_buffer_with_size_; |
+ gfx::Size expected_damage_buffer_size_; |
+ gfx::Size last_damage_buffer_size_; |
scoped_refptr<MessageLoopRunner> send_message_loop_runner_; |
scoped_refptr<MessageLoopRunner> crash_message_loop_runner_; |
@@ -89,6 +95,7 @@ class TestBrowserPluginGuest : public BrowserPluginGuest, |
scoped_refptr<MessageLoopRunner> was_hidden_message_loop_runner_; |
scoped_refptr<MessageLoopRunner> reload_message_loop_runner_; |
scoped_refptr<MessageLoopRunner> stop_message_loop_runner_; |
+ scoped_refptr<MessageLoopRunner> damage_buffer_message_loop_runner_; |
// A scoped container for notification registries. |
NotificationRegistrar registrar_; |