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 "ipc/ipc_channel.h" | 10 #include "ipc/ipc_channel.h" |
(...skipping 27 matching lines...) Expand all Loading... | |
38 const WebKit::WebURLError& error) {} | 38 const WebKit::WebURLError& error) {} |
39 virtual void DidCommitProvisionalLoad(WebKit::WebFrame* frame, | 39 virtual void DidCommitProvisionalLoad(WebKit::WebFrame* frame, |
40 bool is_new_navigation) {} | 40 bool is_new_navigation) {} |
41 virtual void DidCreateDocumentElement(WebKit::WebFrame* frame) {} | 41 virtual void DidCreateDocumentElement(WebKit::WebFrame* frame) {} |
42 virtual void FrameDetached(WebKit::WebFrame* frame) {} | 42 virtual void FrameDetached(WebKit::WebFrame* frame) {} |
43 virtual void FrameWillClose(WebKit::WebFrame* frame) {} | 43 virtual void FrameWillClose(WebKit::WebFrame* frame) {} |
44 virtual void WillSubmitForm(WebKit::WebFrame* frame, | 44 virtual void WillSubmitForm(WebKit::WebFrame* frame, |
45 const WebKit::WebFormElement& form) {} | 45 const WebKit::WebFormElement& form) {} |
46 virtual void DidCreateDataSource(WebKit::WebFrame* frame, | 46 virtual void DidCreateDataSource(WebKit::WebFrame* frame, |
47 WebKit::WebDataSource* ds) {} | 47 WebKit::WebDataSource* ds) {} |
48 virtual void printPage(WebKit::WebFrame* frame) {} | |
jam
2011/04/05 18:10:07
this needs to be PrintPage (i.e. chromium style in
Lei Zhang
2011/04/05 21:03:16
Done.
| |
48 | 49 |
49 // These match the RenderView methods below. | 50 // These match the RenderView methods below. |
50 virtual void FrameTranslated(WebKit::WebFrame* frame) {} | 51 virtual void FrameTranslated(WebKit::WebFrame* frame) {} |
51 virtual void DidHandleMouseEvent(const WebKit::WebMouseEvent& event) {} | 52 virtual void DidHandleMouseEvent(const WebKit::WebMouseEvent& event) {} |
52 virtual void PageCaptured(const string16& page_text, | 53 virtual void PageCaptured(const string16& page_text, |
53 bool preliminary_capture) {} | 54 bool preliminary_capture) {} |
54 | 55 |
55 protected: | 56 protected: |
56 RenderViewObserver(RenderView* render_view); | 57 explicit RenderViewObserver(RenderView* render_view); |
57 virtual ~RenderViewObserver(); | 58 virtual ~RenderViewObserver(); |
58 | 59 |
59 // IPC::Channel::Listener implementation. | 60 // IPC::Channel::Listener implementation. |
60 virtual bool OnMessageReceived(const IPC::Message& message); | 61 virtual bool OnMessageReceived(const IPC::Message& message); |
61 | 62 |
62 // IPC::Message::Sender implementation. | 63 // IPC::Message::Sender implementation. |
63 virtual bool Send(IPC::Message* message); | 64 virtual bool Send(IPC::Message* message); |
64 | 65 |
65 RenderView* render_view() { return render_view_; } | 66 RenderView* render_view() { return render_view_; } |
66 int routing_id() { return routing_id_; } | 67 int routing_id() { return routing_id_; } |
67 | 68 |
68 private: | 69 private: |
69 friend class RenderView; | 70 friend class RenderView; |
70 | 71 |
71 void set_render_view(RenderView* rv) { render_view_ = rv; } | 72 void set_render_view(RenderView* rv) { render_view_ = rv; } |
72 | 73 |
73 RenderView* render_view_; | 74 RenderView* render_view_; |
74 // The routing ID of the associated RenderView. | 75 // The routing ID of the associated RenderView. |
75 int routing_id_; | 76 int routing_id_; |
76 | 77 |
77 DISALLOW_COPY_AND_ASSIGN(RenderViewObserver); | 78 DISALLOW_COPY_AND_ASSIGN(RenderViewObserver); |
78 }; | 79 }; |
79 | 80 |
80 #endif // CONTENT_RENDERER_RENDER_VIEW_OBSERVER_H_ | 81 #endif // CONTENT_RENDERER_RENDER_VIEW_OBSERVER_H_ |
OLD | NEW |