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

Unified Diff: content/public/renderer/render_view_observer.h

Issue 2034153002: Makes RenderFrameObserver/RenderViewObserver::OnDestruct pure virtual. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments. Created 4 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 | « content/public/renderer/render_frame_observer.cc ('k') | content/public/renderer/render_view_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/renderer/render_view_observer.h
diff --git a/content/public/renderer/render_view_observer.h b/content/public/renderer/render_view_observer.h
index a245e632c91be3e1f74afb1042c647ebc8808ca6..a3fa20cfc26e59a3404b4dc45bc564a8f7cbf724 100644
--- a/content/public/renderer/render_view_observer.h
+++ b/content/public/renderer/render_view_observer.h
@@ -31,9 +31,10 @@ class RenderViewImpl;
class CONTENT_EXPORT RenderViewObserver : public IPC::Listener,
public IPC::Sender {
public:
- // By default, observers will be deleted when the RenderView goes away. If
- // they want to outlive it, they can override this function.
- virtual void OnDestruct();
+ // A subclass can use this to delete itself. If it does not, the subclass must
+ // always null-check each call to render_view() becase the RenderView can
+ // go away at any time.
+ virtual void OnDestruct() = 0;
// These match the WebKit API notifications
virtual void DidStartLoading() {}
« no previous file with comments | « content/public/renderer/render_frame_observer.cc ('k') | content/public/renderer/render_view_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698