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

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

Issue 1162053003: Move BrowserPluginDelegate's lifetime mgmt out of content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make dtor protected Created 5 years, 6 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/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 379369790a512541dc2fc3277e46a1813d63c3f7..a2ca663dd831d8a732bc8f42ade940e0a4dddd64 100644
--- a/content/renderer/browser_plugin/browser_plugin.h
+++ b/content/renderer/browser_plugin/browser_plugin.h
@@ -55,8 +55,6 @@ class CONTENT_EXPORT BrowserPlugin :
// A request to enable hardware compositing.
void EnableCompositing(bool enable);
- void UpdateInternalInstanceId();
-
// Provided that a guest instance ID has been allocated, this method attaches
// this BrowserPlugin instance to that guest.
void Attach();
@@ -146,7 +144,8 @@ class CONTENT_EXPORT BrowserPlugin :
// uniquely identifies a guest WebContents that's hosted by this
// BrowserPlugin.
BrowserPlugin(RenderFrame* render_frame,
- scoped_ptr<BrowserPluginDelegate> delegate);
+ const std::string& mime_type,
Fady Samuel 2015/06/05 17:31:13 I still don't understand this change? Why not simp
lazyboy 2015/06/05 21:24:00 Done.
+ const GURL& original_url);
~BrowserPlugin() override;
@@ -201,7 +200,11 @@ class CONTENT_EXPORT BrowserPlugin :
std::vector<EditCommand> edit_commands_;
- scoped_ptr<BrowserPluginDelegate> delegate_;
+ // Once set, ownership is transfered to our shadow root HTML element's GC.
+ BrowserPluginDelegate* delegate_;
+
+ const std::string mime_type_;
+ const GURL original_url_;
// Weak factory used in v8 |MakeWeak| callback, since the v8 callback might
// get called after BrowserPlugin has been destroyed.

Powered by Google App Engine
This is Rietveld 408576698