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

Unified Diff: content/renderer/browser_plugin/browser_plugin.h

Issue 444813002: Remove BrowserPlugin's -internal-attach method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
« no previous file with comments | « content/public/renderer/render_view.h ('k') | content/renderer/browser_plugin/browser_plugin.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/browser_plugin/browser_plugin.h
diff --git a/content/renderer/browser_plugin/browser_plugin.h b/content/renderer/browser_plugin/browser_plugin.h
index d35b173c80cb15d54f0647fbf282260f74041d16..9877080dcf89c7eb372d289f4a64702bcaa1efa2 100644
--- a/content/renderer/browser_plugin/browser_plugin.h
+++ b/content/renderer/browser_plugin/browser_plugin.h
@@ -80,8 +80,6 @@ class CONTENT_EXPORT BrowserPlugin :
// Returns whether the guest process has crashed.
bool guest_crashed() const { return guest_crashed_; }
- // Returns whether this BrowserPlugin has allocated an instance ID.
- bool HasGuestInstanceID() const;
// Informs the guest of an updated focus state.
void UpdateGuestFocusState();
@@ -96,15 +94,15 @@ class CONTENT_EXPORT BrowserPlugin :
void EnableCompositing(bool enable);
// Provided that a guest instance ID has been allocated, this method attaches
- // this BrowserPlugin instance to that guest. |extra_params| are parameters
- // passed in by the content embedder to the browser process.
- void Attach(int guest_instance_id,
- scoped_ptr<base::DictionaryValue> extra_params);
+ // this BrowserPlugin instance to that guest.
+ void Attach();
// Notify the plugin about a compositor commit so that frame ACKs could be
// sent, if needed.
void DidCommitCompositorFrame();
+ static BrowserPlugin* FromNode(blink::WebNode& node);
+
// Returns whether a message should be forwarded to BrowserPlugin.
static bool ShouldForwardToBrowserPlugin(const IPC::Message& message);
@@ -235,7 +233,7 @@ class CONTENT_EXPORT BrowserPlugin :
// IPC message handlers.
// Please keep in alphabetical order.
void OnAdvanceFocus(int instance_id, bool reverse);
- void OnAttachACK(int instance_id);
+ void OnAttachACK(int browser_plugin_instance_id, int guest_instance_id);
void OnBuffersSwapped(int instance_id,
const FrameMsg_BuffersSwapped_Params& params);
void OnCompositorFrameSwapped(const IPC::Message& message);
@@ -258,6 +256,8 @@ class CONTENT_EXPORT BrowserPlugin :
// This indicates whether this BrowserPlugin has been attached to a
// WebContents.
bool attached_;
+ // This indicates that this BrowserPlugin is in the process of being attached.
+ bool attach_pending_;
const base::WeakPtr<RenderViewImpl> render_view_;
// We cache the |render_view_|'s routing ID because we need it on destruction.
// If the |render_view_| is destroyed before the BrowserPlugin is destroyed
@@ -299,6 +299,10 @@ class CONTENT_EXPORT BrowserPlugin :
// Used to identify the plugin to WebBindings.
scoped_ptr<struct _NPP> npp_;
+ // URL for the embedder frame.
+ bool in_render_tree_;
+ int instance_id_;
+
std::vector<EditCommand> edit_commands_;
// Weak factory used in v8 |MakeWeak| callback, since the v8 callback might
« no previous file with comments | « content/public/renderer/render_view.h ('k') | content/renderer/browser_plugin/browser_plugin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698