| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_BROWSER_BROWSER_PLUGIN_TEST_BROWSER_PLUGIN_GUEST_H_ | 5 #ifndef CONTENT_BROWSER_BROWSER_PLUGIN_TEST_BROWSER_PLUGIN_GUEST_H_ |
| 6 #define CONTENT_BROWSER_BROWSER_PLUGIN_TEST_BROWSER_PLUGIN_GUEST_H_ | 6 #define CONTENT_BROWSER_BROWSER_PLUGIN_TEST_BROWSER_PLUGIN_GUEST_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/process_util.h" | 9 #include "base/process_util.h" |
| 10 #include "content/browser/browser_plugin/browser_plugin_guest.h" | 10 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 // Overridden methods from BrowserPluginGuest to intercept in test objects. | 38 // Overridden methods from BrowserPluginGuest to intercept in test objects. |
| 39 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; | 39 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; |
| 40 virtual void HandleInputEvent(RenderViewHost* render_view_host, | 40 virtual void HandleInputEvent(RenderViewHost* render_view_host, |
| 41 const gfx::Rect& guest_window_rect, | 41 const gfx::Rect& guest_window_rect, |
| 42 const gfx::Rect& guest_screen_rect, | 42 const gfx::Rect& guest_screen_rect, |
| 43 const WebKit::WebInputEvent& event) OVERRIDE; | 43 const WebKit::WebInputEvent& event) OVERRIDE; |
| 44 virtual void SetFocus(bool focused) OVERRIDE; | 44 virtual void SetFocus(bool focused) OVERRIDE; |
| 45 virtual bool ViewTakeFocus(bool reverse) OVERRIDE; | 45 virtual bool ViewTakeFocus(bool reverse) OVERRIDE; |
| 46 virtual void Reload() OVERRIDE; | 46 virtual void Reload() OVERRIDE; |
| 47 virtual void Stop() OVERRIDE; | 47 virtual void Stop() OVERRIDE; |
| 48 virtual void SetDamageBuffer(TransportDIB* damage_buffer, | 48 virtual void SetDamageBuffer( |
| 49 #if defined(OS_WIN) | 49 const BrowserPluginHostMsg_ResizeGuest_Params& params) OVERRIDE; |
| 50 int damage_buffer_size, | |
| 51 TransportDIB::Handle remote_handle, | |
| 52 #endif | |
| 53 const gfx::Size& damage_view_size, | |
| 54 float scale_factor) OVERRIDE; | |
| 55 virtual void DidStopLoading(RenderViewHost* render_view_host) OVERRIDE; | 50 virtual void DidStopLoading(RenderViewHost* render_view_host) OVERRIDE; |
| 56 | 51 |
| 57 // Test utilities to wait for a event we are interested in. | 52 // Test utilities to wait for a event we are interested in. |
| 58 // Waits until UpdateRect message is sent from the guest, meaning it is | 53 // Waits until UpdateRect message is sent from the guest, meaning it is |
| 59 // ready/rendered. | 54 // ready/rendered. |
| 60 void WaitForUpdateRectMsg(); | 55 void WaitForUpdateRectMsg(); |
| 61 void ResetUpdateRectCount(); | 56 void ResetUpdateRectCount(); |
| 62 // Waits until a guest receives a damage buffer of the specified |size|. | 57 // Waits until a guest receives a damage buffer of the specified |size|. |
| 63 void WaitForDamageBufferWithSize(const gfx::Size& size); | 58 void WaitForDamageBufferWithSize(const gfx::Size& size); |
| 64 // Waits for focus to reach this guest. | 59 // Waits for focus to reach this guest. |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 scoped_refptr<MessageLoopRunner> input_message_loop_runner_; | 113 scoped_refptr<MessageLoopRunner> input_message_loop_runner_; |
| 119 scoped_refptr<MessageLoopRunner> load_stop_message_loop_runner_; | 114 scoped_refptr<MessageLoopRunner> load_stop_message_loop_runner_; |
| 120 scoped_refptr<MessageLoopRunner> auto_view_size_message_loop_runner_; | 115 scoped_refptr<MessageLoopRunner> auto_view_size_message_loop_runner_; |
| 121 | 116 |
| 122 DISALLOW_COPY_AND_ASSIGN(TestBrowserPluginGuest); | 117 DISALLOW_COPY_AND_ASSIGN(TestBrowserPluginGuest); |
| 123 }; | 118 }; |
| 124 | 119 |
| 125 } // namespace content | 120 } // namespace content |
| 126 | 121 |
| 127 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_TEST_BROWSER_PLUGIN_GUEST_H_ | 122 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_TEST_BROWSER_PLUGIN_GUEST_H_ |
| OLD | NEW |