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

Unified Diff: chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h

Issue 611563002: GuestView: Use Weak Pointers Throughout (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed bug where openers become NULL before WillDestroy Created 6 years, 2 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 | chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h
diff --git a/chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h b/chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h
index 4ddd70e753502bb5c92f2d085646f7b76c6b69a5..667cf73e64669aefda8f031b2854fd73c15f6e5f 100644
--- a/chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h
+++ b/chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h
@@ -88,6 +88,10 @@ class ChromeWebViewGuestDelegate : public extensions::WebViewGuestDelegate,
extensions::WebViewGuest* const web_view_guest_;
+ // This is used to ensure pending tasks will not fire after this object is
+ // destroyed.
+ base::WeakPtrFactory<ChromeWebViewGuestDelegate> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(ChromeWebViewGuestDelegate);
};
« no previous file with comments | « no previous file | chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698