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" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 virtual void DidCommitProvisionalLoad(bool is_new_navigation) {} | 47 virtual void DidCommitProvisionalLoad(bool is_new_navigation) {} |
48 virtual void DidStartProvisionalLoad() {} | 48 virtual void DidStartProvisionalLoad() {} |
49 virtual void DidFailProvisionalLoad(const blink::WebURLError& error) {} | 49 virtual void DidFailProvisionalLoad(const blink::WebURLError& error) {} |
50 virtual void DidFinishLoad() {} | 50 virtual void DidFinishLoad() {} |
51 virtual void DidFinishDocumentLoad() {} | 51 virtual void DidFinishDocumentLoad() {} |
52 virtual void WillReleaseScriptContext(v8::Handle<v8::Context> context, | 52 virtual void WillReleaseScriptContext(v8::Handle<v8::Context> context, |
53 int world_id) {} | 53 int world_id) {} |
54 virtual void DidClearWindowObject() {} | 54 virtual void DidClearWindowObject() {} |
55 virtual void DidChangeName(const base::string16& name) {} | 55 virtual void DidChangeName(const base::string16& name) {} |
56 | 56 |
| 57 // Called when the frame will soon be closed. This is the last opportunity to |
| 58 // send messages to the host (e.g., for clean-up, shutdown, etc.). |
| 59 virtual void FrameWillClose() {} |
| 60 |
57 // Called when we receive a console message from Blink for which we requested | 61 // Called when we receive a console message from Blink for which we requested |
58 // extra details (like the stack trace). |message| is the error message, | 62 // extra details (like the stack trace). |message| is the error message, |
59 // |source| is the Blink-reported source of the error (either external or | 63 // |source| is the Blink-reported source of the error (either external or |
60 // internal), and |stack_trace| is the stack trace of the error in a | 64 // internal), and |stack_trace| is the stack trace of the error in a |
61 // human-readable format (each frame is formatted as | 65 // human-readable format (each frame is formatted as |
62 // "\n at function_name (source:line_number:column_number)"). | 66 // "\n at function_name (source:line_number:column_number)"). |
63 virtual void DetailedConsoleMessageAdded(const base::string16& message, | 67 virtual void DetailedConsoleMessageAdded(const base::string16& message, |
64 const base::string16& source, | 68 const base::string16& source, |
65 const base::string16& stack_trace, | 69 const base::string16& stack_trace, |
66 int32 line_number, | 70 int32 line_number, |
(...skipping 25 matching lines...) Expand all Loading... |
92 RenderFrame* render_frame_; | 96 RenderFrame* render_frame_; |
93 // The routing ID of the associated RenderFrame. | 97 // The routing ID of the associated RenderFrame. |
94 int routing_id_; | 98 int routing_id_; |
95 | 99 |
96 DISALLOW_COPY_AND_ASSIGN(RenderFrameObserver); | 100 DISALLOW_COPY_AND_ASSIGN(RenderFrameObserver); |
97 }; | 101 }; |
98 | 102 |
99 } // namespace content | 103 } // namespace content |
100 | 104 |
101 #endif // CONTENT_PUBLIC_RENDERER_RENDER_FRAME_OBSERVER_H_ | 105 #endif // CONTENT_PUBLIC_RENDERER_RENDER_FRAME_OBSERVER_H_ |
OLD | NEW |