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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_RENDERER_RENDER_VIEW_OBSERVER_H_ 5 #ifndef CONTENT_PUBLIC_RENDERER_RENDER_VIEW_OBSERVER_H_
6 #define CONTENT_PUBLIC_RENDERER_RENDER_VIEW_OBSERVER_H_ 6 #define CONTENT_PUBLIC_RENDERER_RENDER_VIEW_OBSERVER_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
(...skipping 13 matching lines...) Expand all
24 namespace content { 24 namespace content {
25 25
26 class RenderView; 26 class RenderView;
27 class RenderViewImpl; 27 class RenderViewImpl;
28 28
29 // Base class for objects that want to filter incoming IPCs, and also get 29 // Base class for objects that want to filter incoming IPCs, and also get
30 // notified of changes to the frame. 30 // notified of changes to the frame.
31 class CONTENT_EXPORT RenderViewObserver : public IPC::Listener, 31 class CONTENT_EXPORT RenderViewObserver : public IPC::Listener,
32 public IPC::Sender { 32 public IPC::Sender {
33 public: 33 public:
34 // By default, observers will be deleted when the RenderView goes away. If 34 // 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.
35 // they want to outlive it, they can override this function. 35 // always null-check each call to render_view() becase the RenderView can
36 virtual void OnDestruct(); 36 // go away at any time.
37 virtual void OnDestruct() = 0;
37 38
38 // These match the WebKit API notifications 39 // These match the WebKit API notifications
39 virtual void DidStartLoading() {} 40 virtual void DidStartLoading() {}
40 virtual void DidStopLoading() {} 41 virtual void DidStopLoading() {}
41 virtual void DidFinishDocumentLoad(blink::WebLocalFrame* frame) {} 42 virtual void DidFinishDocumentLoad(blink::WebLocalFrame* frame) {}
42 virtual void DidFailLoad(blink::WebLocalFrame* frame, 43 virtual void DidFailLoad(blink::WebLocalFrame* frame,
43 const blink::WebURLError& error) {} 44 const blink::WebURLError& error) {}
44 virtual void DidFinishLoad(blink::WebLocalFrame* frame) {} 45 virtual void DidFinishLoad(blink::WebLocalFrame* frame) {}
45 virtual void DidStartProvisionalLoad(blink::WebLocalFrame* frame) {} 46 virtual void DidStartProvisionalLoad(blink::WebLocalFrame* frame) {}
46 virtual void DidFailProvisionalLoad(blink::WebLocalFrame* frame, 47 virtual void DidFailProvisionalLoad(blink::WebLocalFrame* frame,
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 RenderViewImpl* render_view_; 107 RenderViewImpl* render_view_;
107 // The routing ID of the associated RenderView. 108 // The routing ID of the associated RenderView.
108 int routing_id_; 109 int routing_id_;
109 110
110 DISALLOW_COPY_AND_ASSIGN(RenderViewObserver); 111 DISALLOW_COPY_AND_ASSIGN(RenderViewObserver);
111 }; 112 };
112 113
113 } // namespace content 114 } // namespace content
114 115
115 #endif // CONTENT_PUBLIC_RENDERER_RENDER_VIEW_OBSERVER_H_ 116 #endif // CONTENT_PUBLIC_RENDERER_RENDER_VIEW_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698