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

Unified Diff: content/browser/browser_plugin/browser_plugin_guest.h

Issue 10965009: BrowserPluginGuest/Embedder: Remove friend helper classes, made necessary calls public (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
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_;
« no previous file with comments | « content/browser/browser_plugin/browser_plugin_embedder.cc ('k') | content/browser/browser_plugin/browser_plugin_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698