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 "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
11 #include "ipc/ipc_listener.h" | 12 #include "ipc/ipc_listener.h" |
12 #include "ipc/ipc_sender.h" | 13 #include "ipc/ipc_sender.h" |
13 #include "v8/include/v8.h" | 14 #include "v8/include/v8.h" |
14 | 15 |
15 namespace blink { | 16 namespace blink { |
16 class WebFrame; | 17 class WebFrame; |
17 struct WebURLError; | 18 struct WebURLError; |
18 } | 19 } |
19 | 20 |
(...skipping 21 matching lines...) Expand all Loading... | |
41 // These match the Blink API notifications | 42 // These match the Blink API notifications |
42 virtual void DidCommitProvisionalLoad(bool is_new_navigation) {} | 43 virtual void DidCommitProvisionalLoad(bool is_new_navigation) {} |
43 virtual void DidStartProvisionalLoad() {} | 44 virtual void DidStartProvisionalLoad() {} |
44 virtual void DidFailProvisionalLoad(const blink::WebURLError& error) {} | 45 virtual void DidFailProvisionalLoad(const blink::WebURLError& error) {} |
45 virtual void DidFinishLoad() {} | 46 virtual void DidFinishLoad() {} |
46 virtual void DidFinishDocumentLoad() {} | 47 virtual void DidFinishDocumentLoad() {} |
47 virtual void WillReleaseScriptContext(v8::Handle<v8::Context> context, | 48 virtual void WillReleaseScriptContext(v8::Handle<v8::Context> context, |
48 int world_id) {} | 49 int world_id) {} |
49 virtual void DidClearWindowObject(int world_id) {} | 50 virtual void DidClearWindowObject(int world_id) {} |
50 | 51 |
52 // Called when we receive a console message from WebKit for which we requested | |
nasko
2014/03/28 23:05:05
nit: Blink
mkosiba (inactive)
2014/03/31 09:48:41
Done.
| |
53 // extra details (like the stack trace). |message| is the error message, | |
54 // |source| is the WebKit-reported source of the error (either external or | |
nasko
2014/03/28 23:05:05
nit: Blink
mkosiba (inactive)
2014/03/31 09:48:41
Done.
| |
55 // internal), and |stack_trace| is the stack trace of the error in a | |
56 // human-readable format (each frame is formatted as | |
57 // "\n at function_name (source:line_number:column_number)"). | |
58 virtual void DetailedConsoleMessageAdded(const base::string16& message, | |
59 const base::string16& source, | |
60 const base::string16& stack_trace, | |
61 int32 line_number, | |
62 int32 severity_level) {} | |
63 | |
51 // IPC::Listener implementation. | 64 // IPC::Listener implementation. |
52 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 65 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
53 | 66 |
54 // IPC::Sender implementation. | 67 // IPC::Sender implementation. |
55 virtual bool Send(IPC::Message* message) OVERRIDE; | 68 virtual bool Send(IPC::Message* message) OVERRIDE; |
56 | 69 |
57 RenderFrame* render_frame() const; | 70 RenderFrame* render_frame() const; |
58 int routing_id() const { return routing_id_; } | 71 int routing_id() const { return routing_id_; } |
59 | 72 |
60 protected: | 73 protected: |
(...skipping 10 matching lines...) Expand all Loading... | |
71 RenderFrame* render_frame_; | 84 RenderFrame* render_frame_; |
72 // The routing ID of the associated RenderFrame. | 85 // The routing ID of the associated RenderFrame. |
73 int routing_id_; | 86 int routing_id_; |
74 | 87 |
75 DISALLOW_COPY_AND_ASSIGN(RenderFrameObserver); | 88 DISALLOW_COPY_AND_ASSIGN(RenderFrameObserver); |
76 }; | 89 }; |
77 | 90 |
78 } // namespace content | 91 } // namespace content |
79 | 92 |
80 #endif // CONTENT_PUBLIC_RENDERER_RENDER_FRAME_OBSERVER_H_ | 93 #endif // CONTENT_PUBLIC_RENDERER_RENDER_FRAME_OBSERVER_H_ |
OLD | NEW |