OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_FRAME_OBSERVER_H_ | 5 #ifndef CONTENT_PUBLIC_RENDERER_RENDER_FRAME_OBSERVER_H_ |
6 #define CONTENT_PUBLIC_RENDERER_RENDER_FRAME_OBSERVER_H_ | 6 #define CONTENT_PUBLIC_RENDERER_RENDER_FRAME_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 "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
12 #include "ipc/ipc_listener.h" | 12 #include "ipc/ipc_listener.h" |
13 #include "ipc/ipc_sender.h" | 13 #include "ipc/ipc_sender.h" |
14 #include "third_party/WebKit/public/platform/WebVector.h" | 14 #include "third_party/WebKit/public/platform/WebVector.h" |
| 15 #include "third_party/WebKit/public/web/WebMeaningfulLayout.h" |
15 #include "v8/include/v8.h" | 16 #include "v8/include/v8.h" |
16 | 17 |
17 namespace blink { | 18 namespace blink { |
18 class WebFormElement; | 19 class WebFormElement; |
19 class WebFrame; | 20 class WebFrame; |
20 class WebNode; | 21 class WebNode; |
21 class WebString; | 22 class WebString; |
22 struct WebURLError; | 23 struct WebURLError; |
23 } | 24 } |
24 | 25 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 // |source| is the Blink-reported source of the error (either external or | 90 // |source| is the Blink-reported source of the error (either external or |
90 // internal), and |stack_trace| is the stack trace of the error in a | 91 // internal), and |stack_trace| is the stack trace of the error in a |
91 // human-readable format (each frame is formatted as | 92 // human-readable format (each frame is formatted as |
92 // "\n at function_name (source:line_number:column_number)"). | 93 // "\n at function_name (source:line_number:column_number)"). |
93 virtual void DetailedConsoleMessageAdded(const base::string16& message, | 94 virtual void DetailedConsoleMessageAdded(const base::string16& message, |
94 const base::string16& source, | 95 const base::string16& source, |
95 const base::string16& stack_trace, | 96 const base::string16& stack_trace, |
96 int32 line_number, | 97 int32 line_number, |
97 int32 severity_level) {} | 98 int32 severity_level) {} |
98 | 99 |
| 100 // Called when an interesting (from document lifecycle perspective), |
| 101 // compositor-driven layout had happened. This is a reasonable hook to use |
| 102 // to inspect the document and layout information, since it is in a clean |
| 103 // state and you won't accidentally force new layouts. |
| 104 // The interestingness of layouts is explained in WebMeaningfulLayout.h. |
| 105 virtual void DidMeaningfulLayout(blink::WebMeaningfulLayout layout_type) {} |
| 106 |
99 // Called when a compositor frame has committed. | 107 // Called when a compositor frame has committed. |
100 virtual void DidCommitCompositorFrame() {} | 108 virtual void DidCommitCompositorFrame() {} |
101 | 109 |
102 // Notifications when |PerformanceTiming| data becomes available | 110 // Notifications when |PerformanceTiming| data becomes available |
103 virtual void DidChangePerformanceTiming() {} | 111 virtual void DidChangePerformanceTiming() {} |
104 | 112 |
105 // Called when the focused node has changed to |node|. | 113 // Called when the focused node has changed to |node|. |
106 virtual void FocusedNodeChanged(const blink::WebNode& node) {} | 114 virtual void FocusedNodeChanged(const blink::WebNode& node) {} |
107 | 115 |
108 // IPC::Listener implementation. | 116 // IPC::Listener implementation. |
(...skipping 19 matching lines...) Expand all Loading... |
128 RenderFrame* render_frame_; | 136 RenderFrame* render_frame_; |
129 // The routing ID of the associated RenderFrame. | 137 // The routing ID of the associated RenderFrame. |
130 int routing_id_; | 138 int routing_id_; |
131 | 139 |
132 DISALLOW_COPY_AND_ASSIGN(RenderFrameObserver); | 140 DISALLOW_COPY_AND_ASSIGN(RenderFrameObserver); |
133 }; | 141 }; |
134 | 142 |
135 } // namespace content | 143 } // namespace content |
136 | 144 |
137 #endif // CONTENT_PUBLIC_RENDERER_RENDER_FRAME_OBSERVER_H_ | 145 #endif // CONTENT_PUBLIC_RENDERER_RENDER_FRAME_OBSERVER_H_ |
OLD | NEW |