Index: content/browser/browser_plugin/browser_plugin_guest.h |
diff --git a/content/browser/browser_plugin/browser_plugin_guest.h b/content/browser/browser_plugin/browser_plugin_guest.h |
index 27d438b9988cac97b5aae44ae6408a5a7ec4a519..f592228f00b2464919f6dc2ef8e306acf39d5113 100644 |
--- a/content/browser/browser_plugin/browser_plugin_guest.h |
+++ b/content/browser/browser_plugin/browser_plugin_guest.h |
@@ -76,6 +76,11 @@ class CONTENT_EXPORT BrowserPluginGuest : public WebContentsDelegate, |
guest_hang_timeout_ = timeout; |
} |
+ void set_embedder_render_process_host( |
+ RenderProcessHost* render_process_host) { |
+ embedder_render_process_host_ = render_process_host; |
+ } |
+ |
// WebContentsObserver implementation. |
virtual void DidCommitProvisionalLoadForFrame( |
int64 frame_id, |
@@ -88,30 +93,6 @@ class CONTENT_EXPORT BrowserPluginGuest : public WebContentsDelegate, |
// WebContentsDelegate implementation. |
virtual void RendererUnresponsive(WebContents* source) OVERRIDE; |
- private: |
- friend class BrowserPluginEmbedder; |
- friend class BrowserPluginGuestHelper; |
- friend class TestBrowserPluginGuest; |
- |
- BrowserPluginGuest(int instance_id, |
- WebContentsImpl* web_contents, |
- RenderViewHost* render_view_host); |
- |
- void set_embedder_render_process_host( |
- RenderProcessHost* render_process_host) { |
- embedder_render_process_host_ = render_process_host; |
- } |
- RenderProcessHost* embedder_render_process_host() { |
- return embedder_render_process_host_; |
- } |
- // Returns the identifier that uniquely identifies a browser plugin guest |
- // within an embedder. |
- int instance_id() const { return instance_id_; } |
- TransportDIB* damage_buffer() const { return damage_buffer_.get(); } |
- const gfx::Size& damage_view_size() const { return damage_view_size_; } |
- float damage_buffer_scale_factor() const { |
- return damage_buffer_scale_factor_; |
- } |
void SetDamageBuffer(TransportDIB* damage_buffer, |
#if defined(OS_WIN) |
int damage_buffer_size, |
@@ -138,13 +119,35 @@ class CONTENT_EXPORT BrowserPluginGuest : public WebContentsDelegate, |
// embedder) instead of default view/widget host. |
void HandleInputEventAck(RenderViewHost* render_view_host, bool handled); |
+ WebContents* GetWebContents(); |
Charlie Reis
2012/09/20 18:24:04
It's not immediately obvious why you need this. M
lazyboy
2012/09/20 20:29:43
Done.
|
+ |
+ // Overridden in tests. |
+ virtual bool ViewTakeFocus(bool reverse); |
+ // Overridden in tests. |
+ virtual void SetFocus(bool focused); |
+ |
+ private: |
+ friend class TestBrowserPluginGuest; |
+ |
+ BrowserPluginGuest(int instance_id, |
+ WebContentsImpl* web_contents, |
+ RenderViewHost* render_view_host); |
+ |
+ RenderProcessHost* embedder_render_process_host() { |
+ return embedder_render_process_host_; |
+ } |
+ // Returns the identifier that uniquely identifies a browser plugin guest |
+ // within an embedder. |
+ int instance_id() const { return instance_id_; } |
+ TransportDIB* damage_buffer() const { return damage_buffer_.get(); } |
+ const gfx::Size& damage_view_size() const { return damage_view_size_; } |
+ float damage_buffer_scale_factor() const { |
+ return damage_buffer_scale_factor_; |
+ } |
+ |
// Helper to send messages to embedder. Overridden in test implementation |
// since we want to intercept certain messages for testing. |
virtual void SendMessageToEmbedder(IPC::Message* msg); |
- // Overridden in tests. |
- virtual void SetFocus(bool focused); |
- // Overridden in tests. |
- virtual bool ViewTakeFocus(bool reverse); |
// Static factory instance (always NULL for non-test). |
static content::BrowserPluginHostFactory* factory_; |