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

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

Issue 306003002: Move guest lifetime management to chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed content_browsertests crash Created 6 years, 7 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 3be3d526cc67644958594da433d0cc3b735c7799..40326341d4be9c9c2df4ad2f3fd14162c94d53aa 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.h
+++ b/content/browser/browser_plugin/browser_plugin_guest.h
@@ -106,10 +106,6 @@ class CONTENT_EXPORT BrowserPluginGuest : public WebContentsObserver {
// the mouse has been successfully locked.
bool LockMouse(bool allowed);
- // Called when the embedder WebContents is destroyed to give the
- // BrowserPluginGuest an opportunity to clean up after itself.
- void EmbedderDestroyed();
-
// Called when the embedder WebContents changes visibility.
void EmbedderVisibilityChanged(bool visible);
@@ -199,8 +195,10 @@ class CONTENT_EXPORT BrowserPluginGuest : public WebContentsObserver {
// Called when the drag started by this guest ends at an OS-level.
void EndSystemDrag();
- // |this| takes ownership of |delegate|.
- void SetDelegate(BrowserPluginGuestDelegate* delegate);
+ void set_delegate(BrowserPluginGuestDelegate* delegate) {
+ DCHECK(!delegate_);
+ delegate_ = delegate;
+ }
void RespondToPermissionRequest(int request_id,
bool should_allow,
@@ -226,7 +224,7 @@ class CONTENT_EXPORT BrowserPluginGuest : public WebContentsObserver {
bool has_render_view,
WebContentsImpl* web_contents);
- void WillDestroy(WebContents* web_contents);
+ void WillDestroy();
bool InAutoSizeBounds(const gfx::Size& size) const;
@@ -400,7 +398,7 @@ class CONTENT_EXPORT BrowserPluginGuest : public WebContentsObserver {
// once the guest is attached to a particular embedder.
std::queue<IPC::Message*> pending_messages_;
- scoped_ptr<BrowserPluginGuestDelegate> delegate_;
+ BrowserPluginGuestDelegate* delegate_;
// Weak pointer used to ask GeolocationPermissionContext about geolocation
// permission.
« no previous file with comments | « chrome/browser/guest_view/web_view/web_view_guest.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