OLD | NEW |
---|---|
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/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
(...skipping 10 matching lines...) Expand all Loading... | |
21 struct WebURLError; | 21 struct WebURLError; |
22 } | 22 } |
23 | 23 |
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, |
davidben
2015/08/27 18:53:50
Isn't RenderViewObserver being deprecated? Why not
megjablon
2015/08/27 23:11:02
PageLoadHistograms is derived from RenderViewObser
| |
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 // By default, observers will be deleted when the RenderView goes away. If |
35 // they want to outlive it, they can override this function. | 35 // they want to outlive it, they can override this function. |
36 virtual void OnDestruct(); | 36 virtual void OnDestruct(); |
37 | 37 |
38 // These match the WebKit API notifications | 38 // These match the WebKit API notifications |
39 virtual void DidStartLoading() {} | 39 virtual void DidStartLoading() {} |
40 virtual void DidStopLoading() {} | 40 virtual void DidStopLoading() {} |
41 virtual void DidFinishDocumentLoad(blink::WebLocalFrame* frame) {} | 41 virtual void DidFinishDocumentLoad(blink::WebLocalFrame* frame) {} |
42 virtual void DidFailLoad(blink::WebLocalFrame* frame, | 42 virtual void DidFailLoad(blink::WebLocalFrame* frame, |
43 const blink::WebURLError& error) {} | 43 const blink::WebURLError& error) {} |
44 virtual void DidFinishLoad(blink::WebLocalFrame* frame) {} | 44 virtual void DidFinishLoad(blink::WebLocalFrame* frame) {} |
45 virtual void DidStartProvisionalLoad(blink::WebLocalFrame* frame) {} | 45 virtual void DidStartProvisionalLoad(blink::WebLocalFrame* frame) {} |
46 virtual void DidFailProvisionalLoad(blink::WebLocalFrame* frame, | 46 virtual void DidFailProvisionalLoad(blink::WebLocalFrame* frame, |
47 const blink::WebURLError& error) {} | 47 const blink::WebURLError& error) {} |
48 virtual void DidCommitProvisionalLoad(blink::WebLocalFrame* frame, | 48 virtual void DidCommitProvisionalLoad(blink::WebLocalFrame* frame, |
49 bool is_new_navigation) {} | 49 bool is_new_navigation) {} |
50 virtual void DidCreateNewDocument(blink::WebLocalFrame* frame) {} | 50 virtual void DidCreateNewDocument(blink::WebLocalFrame* frame) {} |
51 virtual void DidClearWindowObject(blink::WebLocalFrame* frame) {} | 51 virtual void DidClearWindowObject(blink::WebLocalFrame* frame) {} |
52 virtual void DidCreateDocumentElement(blink::WebLocalFrame* frame) {} | 52 virtual void DidCreateDocumentElement(blink::WebLocalFrame* frame) {} |
53 virtual void FrameCreated(blink::WebLocalFrame* parent, | 53 virtual void FrameCreated(blink::WebLocalFrame* parent, |
54 blink::WebFrame* frame) {} | 54 blink::WebFrame* frame) {} |
55 virtual void FrameDetached(blink::WebFrame* frame) {} | 55 virtual void FrameDetached(blink::WebFrame* frame) {} |
56 virtual void FrameWillClose(blink::WebFrame* frame) {} | 56 virtual void FrameWillClose(blink::WebFrame* frame, bool lofi_used) {} |
davidben
2015/08/27 18:53:50
This is a rather specific parameter to plumb into
megjablon
2015/08/27 23:11:02
Without PlageLoadHistograms being a subclass of Re
davidben
2015/08/31 23:43:24
I'll defer to nasko, but I would think it's possib
megjablon
2015/09/09 20:54:16
Done.
| |
57 virtual void PrintPage(blink::WebLocalFrame* frame, bool user_initiated) {} | 57 virtual void PrintPage(blink::WebLocalFrame* frame, bool user_initiated) {} |
58 virtual void FocusedNodeChanged(const blink::WebNode& node) {} | 58 virtual void FocusedNodeChanged(const blink::WebNode& node) {} |
59 virtual void DraggableRegionsChanged(blink::WebFrame* frame) {} | 59 virtual void DraggableRegionsChanged(blink::WebFrame* frame) {} |
60 virtual void DidCommitCompositorFrame() {} | 60 virtual void DidCommitCompositorFrame() {} |
61 virtual void DidUpdateLayout() {} | 61 virtual void DidUpdateLayout() {} |
62 | 62 |
63 // These match the RenderView methods. | 63 // These match the RenderView methods. |
64 virtual void DidHandleGestureEvent(const blink::WebGestureEvent& event) {} | 64 virtual void DidHandleGestureEvent(const blink::WebGestureEvent& event) {} |
65 | 65 |
66 virtual void OnMouseDown(const blink::WebNode& mouse_down_node) {} | 66 virtual void OnMouseDown(const blink::WebNode& mouse_down_node) {} |
67 | 67 |
68 // These match incoming IPCs. | 68 // These match incoming IPCs. |
69 virtual void Navigate(const GURL& url) {} | 69 virtual void Navigate(const GURL& url) {} |
70 virtual void ClosePage() {} | 70 virtual void ClosePage(bool lofi_used) {} |
davidben
2015/08/27 18:53:50
Ditto.
megjablon
2015/09/09 20:54:16
Done.
| |
71 | 71 |
72 // This indicates that animations to scroll the focused element into view (if | 72 // This indicates that animations to scroll the focused element into view (if |
73 // any) have completed. May be called more than once for a single focus. Can | 73 // any) have completed. May be called more than once for a single focus. Can |
74 // be called from browser, renderer, or compositor. | 74 // be called from browser, renderer, or compositor. |
75 virtual void FocusChangeComplete() {} | 75 virtual void FocusChangeComplete() {} |
76 | 76 |
77 virtual void OnStop() {} | 77 virtual void OnStop() {} |
78 virtual void OnZoomLevelChanged() {} | 78 virtual void OnZoomLevelChanged() {} |
79 | 79 |
80 // IPC::Listener implementation. | 80 // IPC::Listener implementation. |
(...skipping 25 matching lines...) Expand all Loading... | |
106 RenderView* render_view_; | 106 RenderView* render_view_; |
107 // The routing ID of the associated RenderView. | 107 // The routing ID of the associated RenderView. |
108 int routing_id_; | 108 int routing_id_; |
109 | 109 |
110 DISALLOW_COPY_AND_ASSIGN(RenderViewObserver); | 110 DISALLOW_COPY_AND_ASSIGN(RenderViewObserver); |
111 }; | 111 }; |
112 | 112 |
113 } // namespace content | 113 } // namespace content |
114 | 114 |
115 #endif // CONTENT_PUBLIC_RENDERER_RENDER_VIEW_OBSERVER_H_ | 115 #endif // CONTENT_PUBLIC_RENDERER_RENDER_VIEW_OBSERVER_H_ |
OLD | NEW |