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 "v8/include/v8.h" | 14 #include "v8/include/v8.h" |
15 | 15 |
16 namespace blink { | 16 namespace blink { |
17 class WebFormElement; | 17 class WebFormElement; |
18 class WebFrame; | 18 class WebFrame; |
| 19 class WebNode; |
19 struct WebURLError; | 20 struct WebURLError; |
20 } | 21 } |
21 | 22 |
22 namespace content { | 23 namespace content { |
23 | 24 |
24 class RendererPpapiHost; | 25 class RendererPpapiHost; |
25 class RenderFrame; | 26 class RenderFrame; |
26 class RenderFrameImpl; | 27 class RenderFrameImpl; |
27 | 28 |
28 // 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 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 // "\n at function_name (source:line_number:column_number)"). | 79 // "\n at function_name (source:line_number:column_number)"). |
79 virtual void DetailedConsoleMessageAdded(const base::string16& message, | 80 virtual void DetailedConsoleMessageAdded(const base::string16& message, |
80 const base::string16& source, | 81 const base::string16& source, |
81 const base::string16& stack_trace, | 82 const base::string16& stack_trace, |
82 int32 line_number, | 83 int32 line_number, |
83 int32 severity_level) {} | 84 int32 severity_level) {} |
84 | 85 |
85 // Called when a compositor frame has committed. | 86 // Called when a compositor frame has committed. |
86 virtual void DidCommitCompositorFrame() {} | 87 virtual void DidCommitCompositorFrame() {} |
87 | 88 |
| 89 // Called when the focused node has changed to |node|. |
| 90 virtual void FocusedNodeChanged(const blink::WebNode& node) {} |
| 91 |
88 // IPC::Listener implementation. | 92 // IPC::Listener implementation. |
89 bool OnMessageReceived(const IPC::Message& message) override; | 93 bool OnMessageReceived(const IPC::Message& message) override; |
90 | 94 |
91 // IPC::Sender implementation. | 95 // IPC::Sender implementation. |
92 bool Send(IPC::Message* message) override; | 96 bool Send(IPC::Message* message) override; |
93 | 97 |
94 RenderFrame* render_frame() const; | 98 RenderFrame* render_frame() const; |
95 int routing_id() const { return routing_id_; } | 99 int routing_id() const { return routing_id_; } |
96 | 100 |
97 protected: | 101 protected: |
(...skipping 10 matching lines...) Expand all Loading... |
108 RenderFrame* render_frame_; | 112 RenderFrame* render_frame_; |
109 // The routing ID of the associated RenderFrame. | 113 // The routing ID of the associated RenderFrame. |
110 int routing_id_; | 114 int routing_id_; |
111 | 115 |
112 DISALLOW_COPY_AND_ASSIGN(RenderFrameObserver); | 116 DISALLOW_COPY_AND_ASSIGN(RenderFrameObserver); |
113 }; | 117 }; |
114 | 118 |
115 } // namespace content | 119 } // namespace content |
116 | 120 |
117 #endif // CONTENT_PUBLIC_RENDERER_RENDER_FRAME_OBSERVER_H_ | 121 #endif // CONTENT_PUBLIC_RENDERER_RENDER_FRAME_OBSERVER_H_ |
OLD | NEW |