| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_VIEW_OBSERVER_H_ | 5 #ifndef CONTENT_PUBLIC_RENDERER_RENDER_VIEW_OBSERVER_H_ |
| 6 #define CONTENT_PUBLIC_RENDERER_RENDER_VIEW_OBSERVER_H_ | 6 #define CONTENT_PUBLIC_RENDERER_RENDER_VIEW_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 "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| 11 #include "ipc/ipc_listener.h" | 11 #include "ipc/ipc_listener.h" |
| 12 #include "ipc/ipc_sender.h" | 12 #include "ipc/ipc_sender.h" |
| 13 #include "third_party/WebKit/public/platform/WebVector.h" | 13 #include "third_party/WebKit/public/platform/WebVector.h" |
| 14 #include "third_party/WebKit/public/web/WebIconURL.h" | 14 #include "third_party/WebKit/public/web/WebIconURL.h" |
| 15 // TODO(dcheng): Temporary. Convert back to a forward declare. |
| 16 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
| 15 | 17 |
| 16 class GURL; | 18 class GURL; |
| 17 | 19 |
| 18 namespace ppapi { | 20 namespace ppapi { |
| 19 namespace host { | 21 namespace host { |
| 20 class PpapiHost; | 22 class PpapiHost; |
| 21 } | 23 } |
| 22 } | 24 } |
| 23 | 25 |
| 24 namespace blink { | 26 namespace blink { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 45 class CONTENT_EXPORT RenderViewObserver : public IPC::Listener, | 47 class CONTENT_EXPORT RenderViewObserver : public IPC::Listener, |
| 46 public IPC::Sender { | 48 public IPC::Sender { |
| 47 public: | 49 public: |
| 48 // By default, observers will be deleted when the RenderView goes away. If | 50 // By default, observers will be deleted when the RenderView goes away. If |
| 49 // they want to outlive it, they can override this function. | 51 // they want to outlive it, they can override this function. |
| 50 virtual void OnDestruct(); | 52 virtual void OnDestruct(); |
| 51 | 53 |
| 52 // These match the WebKit API notifications | 54 // These match the WebKit API notifications |
| 53 virtual void DidStartLoading() {} | 55 virtual void DidStartLoading() {} |
| 54 virtual void DidStopLoading() {} | 56 virtual void DidStopLoading() {} |
| 55 virtual void DidFinishDocumentLoad(blink::WebFrame* frame) {} | 57 virtual void DidFinishDocumentLoad(blink::WebLocalFrame* frame) {} |
| 56 virtual void DidFailLoad(blink::WebFrame* frame, | 58 virtual void DidFailLoad(blink::WebLocalFrame* frame, |
| 57 const blink::WebURLError& error) {} | 59 const blink::WebURLError& error) {} |
| 58 virtual void DidFinishLoad(blink::WebFrame* frame) {} | 60 virtual void DidFinishLoad(blink::WebLocalFrame* frame) {} |
| 59 virtual void DidStartProvisionalLoad(blink::WebFrame* frame) {} | 61 virtual void DidStartProvisionalLoad(blink::WebLocalFrame* frame) {} |
| 60 virtual void DidFailProvisionalLoad(blink::WebFrame* frame, | 62 virtual void DidFailProvisionalLoad(blink::WebLocalFrame* frame, |
| 61 const blink::WebURLError& error) {} | 63 const blink::WebURLError& error) {} |
| 62 virtual void DidCommitProvisionalLoad(blink::WebFrame* frame, | 64 virtual void DidCommitProvisionalLoad(blink::WebLocalFrame* frame, |
| 63 bool is_new_navigation) {} | 65 bool is_new_navigation) {} |
| 64 virtual void DidClearWindowObject(blink::WebFrame* frame, int world_id) {} | 66 virtual void DidClearWindowObject(blink::WebLocalFrame* frame, int world_id) { |
| 65 virtual void DidCreateDocumentElement(blink::WebFrame* frame) {} | 67 } |
| 66 virtual void FrameCreated(blink::WebFrame* parent, | 68 virtual void DidCreateDocumentElement(blink::WebLocalFrame* frame) {} |
| 69 virtual void FrameCreated(blink::WebLocalFrame* parent, |
| 67 blink::WebFrame* frame) {} | 70 blink::WebFrame* frame) {} |
| 68 virtual void FrameDetached(blink::WebFrame* frame) {} | 71 virtual void FrameDetached(blink::WebFrame* frame) {} |
| 69 virtual void FrameWillClose(blink::WebFrame* frame) {} | 72 virtual void FrameWillClose(blink::WebFrame* frame) {} |
| 70 virtual void DidMatchCSS( | 73 virtual void DidMatchCSS( |
| 71 blink::WebFrame* frame, | 74 blink::WebLocalFrame* frame, |
| 72 const blink::WebVector<blink::WebString>& newly_matching_selectors, | 75 const blink::WebVector<blink::WebString>& newly_matching_selectors, |
| 73 const blink::WebVector<blink::WebString>& stopped_matching_selectors) {} | 76 const blink::WebVector<blink::WebString>& stopped_matching_selectors) {} |
| 74 virtual void WillSendSubmitEvent(blink::WebFrame* frame, | 77 virtual void WillSendSubmitEvent(blink::WebLocalFrame* frame, |
| 75 const blink::WebFormElement& form) {} | 78 const blink::WebFormElement& form) {} |
| 76 virtual void WillSubmitForm(blink::WebFrame* frame, | 79 virtual void WillSubmitForm(blink::WebLocalFrame* frame, |
| 77 const blink::WebFormElement& form) {} | 80 const blink::WebFormElement& form) {} |
| 78 virtual void DidCreateDataSource(blink::WebFrame* frame, | 81 virtual void DidCreateDataSource(blink::WebLocalFrame* frame, |
| 79 blink::WebDataSource* ds) {} | 82 blink::WebDataSource* ds) {} |
| 80 virtual void PrintPage(blink::WebFrame* frame, bool user_initiated) {} | 83 virtual void PrintPage(blink::WebLocalFrame* frame, bool user_initiated) {} |
| 81 virtual void FocusedNodeChanged(const blink::WebNode& node) {} | 84 virtual void FocusedNodeChanged(const blink::WebNode& node) {} |
| 82 virtual void WillCreateMediaPlayer(blink::WebFrame* frame, | 85 virtual void WillCreateMediaPlayer(blink::WebLocalFrame* frame, |
| 83 blink::WebMediaPlayerClient* client) {} | 86 blink::WebMediaPlayerClient* client) {} |
| 84 virtual void ZoomLevelChanged() {}; | 87 virtual void ZoomLevelChanged() {}; |
| 85 virtual void DidChangeScrollOffset(blink::WebFrame* frame) {} | 88 virtual void DidChangeScrollOffset(blink::WebLocalFrame* frame) {} |
| 86 virtual void DraggableRegionsChanged(blink::WebFrame* frame) {} | 89 virtual void DraggableRegionsChanged(blink::WebFrame* frame) {} |
| 87 virtual void DidCommitCompositorFrame() {} | 90 virtual void DidCommitCompositorFrame() {} |
| 88 virtual void DidUpdateLayout() {} | 91 virtual void DidUpdateLayout() {} |
| 89 | 92 |
| 90 // These match the RenderView methods. | 93 // These match the RenderView methods. |
| 91 virtual void DidHandleMouseEvent(const blink::WebMouseEvent& event) {} | 94 virtual void DidHandleMouseEvent(const blink::WebMouseEvent& event) {} |
| 92 virtual void DidHandleTouchEvent(const blink::WebTouchEvent& event) {} | 95 virtual void DidHandleTouchEvent(const blink::WebTouchEvent& event) {} |
| 93 | 96 |
| 94 // This matches the RenderWidget method. | 97 // This matches the RenderWidget method. |
| 95 virtual void WillProcessUserGesture() {} | 98 virtual void WillProcessUserGesture() {} |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 RenderView* render_view_; | 139 RenderView* render_view_; |
| 137 // The routing ID of the associated RenderView. | 140 // The routing ID of the associated RenderView. |
| 138 int routing_id_; | 141 int routing_id_; |
| 139 | 142 |
| 140 DISALLOW_COPY_AND_ASSIGN(RenderViewObserver); | 143 DISALLOW_COPY_AND_ASSIGN(RenderViewObserver); |
| 141 }; | 144 }; |
| 142 | 145 |
| 143 } // namespace content | 146 } // namespace content |
| 144 | 147 |
| 145 #endif // CONTENT_PUBLIC_RENDERER_RENDER_VIEW_OBSERVER_H_ | 148 #endif // CONTENT_PUBLIC_RENDERER_RENDER_VIEW_OBSERVER_H_ |
| OLD | NEW |