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

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: Addressed comments. 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
« no previous file with comments | « no previous file | components/guest_view/browser/guest_view_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..cba69a12399ee79a353ba532f495b2a49d5afef9 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;
}
+ // Cleans up state when this GuestView is being destroyed.
+ // Note that this 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 by a CleanUp() method in
+ // a derived class, in which case the 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698