| 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 16 matching lines...) Expand all Loading... |
| 27 class RenderViewObserver : public IPC::Channel::Listener, | 27 class RenderViewObserver : public IPC::Channel::Listener, |
| 28 public IPC::Message::Sender { | 28 public IPC::Message::Sender { |
| 29 public: | 29 public: |
| 30 // By default, observers will be deleted when the RenderView goes away. If | 30 // By default, observers will be deleted when the RenderView goes away. If |
| 31 // they want to outlive it, they can override this function. | 31 // they want to outlive it, they can override this function. |
| 32 virtual void OnDestruct(); | 32 virtual void OnDestruct(); |
| 33 | 33 |
| 34 // These match the WebKit API notifications | 34 // These match the WebKit API notifications |
| 35 virtual void DidStartLoading() {} | 35 virtual void DidStartLoading() {} |
| 36 virtual void DidStopLoading() {} | 36 virtual void DidStopLoading() {} |
| 37 virtual void DidChangeIcons(WebKit::WebFrame* frame) {} |
| 37 virtual void DidFinishDocumentLoad(WebKit::WebFrame* frame) {} | 38 virtual void DidFinishDocumentLoad(WebKit::WebFrame* frame) {} |
| 38 virtual void DidFailLoad(WebKit::WebFrame* frame, | 39 virtual void DidFailLoad(WebKit::WebFrame* frame, |
| 39 const WebKit::WebURLError& error) {} | 40 const WebKit::WebURLError& error) {} |
| 40 virtual void DidFinishLoad(WebKit::WebFrame* frame) {} | 41 virtual void DidFinishLoad(WebKit::WebFrame* frame) {} |
| 41 virtual void DidStartProvisionalLoad(WebKit::WebFrame* frame) {} | 42 virtual void DidStartProvisionalLoad(WebKit::WebFrame* frame) {} |
| 42 virtual void DidFailProvisionalLoad(WebKit::WebFrame* frame, | 43 virtual void DidFailProvisionalLoad(WebKit::WebFrame* frame, |
| 43 const WebKit::WebURLError& error) {} | 44 const WebKit::WebURLError& error) {} |
| 44 virtual void DidCommitProvisionalLoad(WebKit::WebFrame* frame, | 45 virtual void DidCommitProvisionalLoad(WebKit::WebFrame* frame, |
| 45 bool is_new_navigation) {} | 46 bool is_new_navigation) {} |
| 47 virtual void DidClearWindowObject(WebKit::WebFrame* frame) {} |
| 46 virtual void WillPerformClientRedirect( | 48 virtual void WillPerformClientRedirect( |
| 47 WebKit::WebFrame* frame, const WebKit::WebURL& from, | 49 WebKit::WebFrame* frame, const WebKit::WebURL& from, |
| 48 const WebKit::WebURL& to, double interval, double fire_time) {} | 50 const WebKit::WebURL& to, double interval, double fire_time) {} |
| 49 virtual void DidCancelClientRedirect(WebKit::WebFrame* frame) {} | 51 virtual void DidCancelClientRedirect(WebKit::WebFrame* frame) {} |
| 50 virtual void DidCompleteClientRedirect(WebKit::WebFrame* frame, | 52 virtual void DidCompleteClientRedirect(WebKit::WebFrame* frame, |
| 51 const WebKit::WebURL& from) {} | 53 const WebKit::WebURL& from) {} |
| 52 virtual void DidCreateDocumentElement(WebKit::WebFrame* frame) {} | 54 virtual void DidCreateDocumentElement(WebKit::WebFrame* frame) {} |
| 53 virtual void FrameDetached(WebKit::WebFrame* frame) {} | 55 virtual void FrameDetached(WebKit::WebFrame* frame) {} |
| 54 virtual void FrameWillClose(WebKit::WebFrame* frame) {} | 56 virtual void FrameWillClose(WebKit::WebFrame* frame) {} |
| 55 virtual void WillSubmitForm(WebKit::WebFrame* frame, | 57 virtual void WillSubmitForm(WebKit::WebFrame* frame, |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 void set_render_view(RenderView* rv) { render_view_ = rv; } | 89 void set_render_view(RenderView* rv) { render_view_ = rv; } |
| 88 | 90 |
| 89 RenderView* render_view_; | 91 RenderView* render_view_; |
| 90 // The routing ID of the associated RenderView. | 92 // The routing ID of the associated RenderView. |
| 91 int routing_id_; | 93 int routing_id_; |
| 92 | 94 |
| 93 DISALLOW_COPY_AND_ASSIGN(RenderViewObserver); | 95 DISALLOW_COPY_AND_ASSIGN(RenderViewObserver); |
| 94 }; | 96 }; |
| 95 | 97 |
| 96 #endif // CONTENT_RENDERER_RENDER_VIEW_OBSERVER_H_ | 98 #endif // CONTENT_RENDERER_RENDER_VIEW_OBSERVER_H_ |
| OLD | NEW |