OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_RENDERER_RENDER_VIEW_OBSERVER_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_VIEW_OBSERVER_H_ |
6 #define CONTENT_RENDERER_RENDER_VIEW_OBSERVER_H_ | 6 #define CONTENT_RENDERER_RENDER_VIEW_OBSERVER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "content/common/content_export.h" |
10 #include "ipc/ipc_channel.h" | 11 #include "ipc/ipc_channel.h" |
11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIconURL.h" | 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIconURL.h" |
12 | 13 |
13 class RenderView; | 14 class RenderView; |
14 | 15 |
15 namespace WebKit { | 16 namespace WebKit { |
16 class WebDataSource; | 17 class WebDataSource; |
17 class WebFrame; | 18 class WebFrame; |
18 class WebFormElement; | 19 class WebFormElement; |
19 class WebMediaPlayerClient; | 20 class WebMediaPlayerClient; |
20 class WebMouseEvent; | 21 class WebMouseEvent; |
21 class WebNode; | 22 class WebNode; |
22 class WebString; | 23 class WebString; |
23 class WebURL; | 24 class WebURL; |
24 struct WebURLError; | 25 struct WebURLError; |
25 } | 26 } |
26 | 27 |
27 // Base class for objects that want to filter incoming IPCs, and also get | 28 // Base class for objects that want to filter incoming IPCs, and also get |
28 // notified of changes to the frame. | 29 // notified of changes to the frame. |
29 class RenderViewObserver : public IPC::Channel::Listener, | 30 class CONTENT_EXPORT RenderViewObserver : public IPC::Channel::Listener, |
30 public IPC::Message::Sender { | 31 public IPC::Message::Sender { |
31 public: | 32 public: |
32 // By default, observers will be deleted when the RenderView goes away. If | 33 // By default, observers will be deleted when the RenderView goes away. If |
33 // they want to outlive it, they can override this function. | 34 // they want to outlive it, they can override this function. |
34 virtual void OnDestruct(); | 35 virtual void OnDestruct(); |
35 | 36 |
36 // These match the WebKit API notifications | 37 // These match the WebKit API notifications |
37 virtual void DidStartLoading() {} | 38 virtual void DidStartLoading() {} |
38 virtual void DidStopLoading() {} | 39 virtual void DidStopLoading() {} |
39 virtual void DidChangeIcon(WebKit::WebFrame* frame, | 40 virtual void DidChangeIcon(WebKit::WebFrame* frame, |
40 WebKit::WebIconURL::Type) {} | 41 WebKit::WebIconURL::Type) {} |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 void set_render_view(RenderView* rv) { render_view_ = rv; } | 92 void set_render_view(RenderView* rv) { render_view_ = rv; } |
92 | 93 |
93 RenderView* render_view_; | 94 RenderView* render_view_; |
94 // The routing ID of the associated RenderView. | 95 // The routing ID of the associated RenderView. |
95 int routing_id_; | 96 int routing_id_; |
96 | 97 |
97 DISALLOW_COPY_AND_ASSIGN(RenderViewObserver); | 98 DISALLOW_COPY_AND_ASSIGN(RenderViewObserver); |
98 }; | 99 }; |
99 | 100 |
100 #endif // CONTENT_RENDERER_RENDER_VIEW_OBSERVER_H_ | 101 #endif // CONTENT_RENDERER_RENDER_VIEW_OBSERVER_H_ |
OLD | NEW |