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

Unified Diff: components/guest_view/browser/guest_view_base.h

Issue 1143333008: Getting rid of more webview memory leaks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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: components/guest_view/browser/guest_view_base.h
diff --git a/components/guest_view/browser/guest_view_base.h b/components/guest_view/browser/guest_view_base.h
index 2f167e15679a54ef9769281843beddf1204b646a..9f9e8be6db12e5aaa746f68771924c4d375c459b 100644
--- a/components/guest_view/browser/guest_view_base.h
+++ b/components/guest_view/browser/guest_view_base.h
@@ -60,6 +60,13 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate,
return nullptr;
}
+ // Clean up state when this GuestView is being destroyed. Note that this
lazyboy 2015/06/05 23:09:55 nits: Cleans up ... "Note that .. " goes to next l
paulmeyer 2015/06/08 17:53:58 Done.
+ // cannot be done in the destructor since a GuestView could potentially be
+ // created and destroyed in JavaScript before getting a GuestViewBase
+ // instance. This method can be hidden in a derived class, in which case the
lazyboy 2015/06/05 23:09:55 I'm not sure I understand the hidden part immediat
paulmeyer 2015/06/08 17:53:58 Done.
+ // derived method should call this one.
+ static void CleanUp(int embedder_process_id, int view_instance_id);
+
static GuestViewBase* FromWebContents(
const content::WebContents* web_contents);
@@ -92,12 +99,6 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate,
// completed loading.
virtual void GuestViewDidStopLoading() {}
- // This method is called before the embedder is destroyed.
- // |owner_web_contents_| should still be valid during this call. This
- // allows the derived class to perform some cleanup related to the embedder
- // web contents.
- virtual void EmbedderWillBeDestroyed() {}
-
// This method is called when the embedder's zoom changes.
virtual void EmbedderZoomChanged(double old_zoom_level,
double new_zoom_level) {}
« no previous file with comments | « no previous file | components/guest_view/browser/guest_view_base.cc » ('j') | components/guest_view/browser/guest_view_base.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698