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

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: 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
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..547fb07420f23822a642930b490d4642514a5695 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();
+ // Subclass can use this to delete itself. If it does not, the subclass must
miu 2016/06/07 17:56:30 nit: s/Subclass/A subclass/
xjz 2016/06/07 18:08:54 Done.
+ // 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() {}

Powered by Google App Engine
This is Rietveld 408576698