| 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_RENDERER_RENDER_FRAME_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
| 6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "content/public/renderer/render_frame.h" | 9 #include "content/public/renderer/render_frame.h" |
| 10 #include "ipc/ipc_message.h" | 10 #include "ipc/ipc_message.h" |
| 11 #include "third_party/WebKit/public/web/WebDataSource.h" | 11 #include "third_party/WebKit/public/web/WebDataSource.h" |
| 12 #include "third_party/WebKit/public/web/WebFrameClient.h" | 12 #include "third_party/WebKit/public/web/WebFrameClient.h" |
| 13 | 13 |
| 14 namespace content { | 14 namespace content { |
| 15 | 15 |
| 16 class RenderViewImpl; | 16 class RenderViewImpl; |
| 17 | 17 |
| 18 class CONTENT_EXPORT RenderFrameImpl | 18 class CONTENT_EXPORT RenderFrameImpl |
| 19 : public RenderFrame, | 19 : public RenderFrame, |
| 20 NON_EXPORTED_BASE(public WebKit::WebFrameClient) { | 20 NON_EXPORTED_BASE(public WebKit::WebFrameClient) { |
| 21 public: | 21 public: |
| 22 RenderFrameImpl(RenderViewImpl* render_view, int routing_id); | 22 // Creates a new RenderFrame. |render_view| is the RenderView object that this |
| 23 // frame belongs to. |
| 24 static RenderFrameImpl* Create(RenderViewImpl* render_view, int32 routing_id); |
| 25 |
| 26 // Used by content_layouttest_support to hook into the creation of |
| 27 // RenderFrameImpls. |
| 28 static void InstallCreateHook( |
| 29 RenderFrameImpl* (*create_render_frame_impl)(RenderViewImpl*, int32)); |
| 30 |
| 23 virtual ~RenderFrameImpl(); | 31 virtual ~RenderFrameImpl(); |
| 24 | 32 |
| 25 // IPC::Sender | 33 // IPC::Sender |
| 26 virtual bool Send(IPC::Message* msg) OVERRIDE; | 34 virtual bool Send(IPC::Message* msg) OVERRIDE; |
| 27 | 35 |
| 28 // IPC::Listener | 36 // IPC::Listener |
| 29 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 37 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
| 30 | 38 |
| 31 // WebKit::WebFrameClient implementation ------------------------------------- | 39 // WebKit::WebFrameClient implementation ------------------------------------- |
| 32 virtual WebKit::WebPlugin* createPlugin( | 40 virtual WebKit::WebPlugin* createPlugin( |
| (...skipping 21 matching lines...) Expand all Loading... |
| 54 virtual void didChangeName(WebKit::WebFrame* frame, | 62 virtual void didChangeName(WebKit::WebFrame* frame, |
| 55 const WebKit::WebString& name); | 63 const WebKit::WebString& name); |
| 56 virtual void loadURLExternally(WebKit::WebFrame* frame, | 64 virtual void loadURLExternally(WebKit::WebFrame* frame, |
| 57 const WebKit::WebURLRequest& request, | 65 const WebKit::WebURLRequest& request, |
| 58 WebKit::WebNavigationPolicy policy); | 66 WebKit::WebNavigationPolicy policy); |
| 59 virtual void loadURLExternally( | 67 virtual void loadURLExternally( |
| 60 WebKit::WebFrame* frame, | 68 WebKit::WebFrame* frame, |
| 61 const WebKit::WebURLRequest& request, | 69 const WebKit::WebURLRequest& request, |
| 62 WebKit::WebNavigationPolicy policy, | 70 WebKit::WebNavigationPolicy policy, |
| 63 const WebKit::WebString& suggested_name); | 71 const WebKit::WebString& suggested_name); |
| 64 // The WebDataSource::ExtraData* is assumed to be a DocumentState* subclass. | |
| 65 virtual WebKit::WebNavigationPolicy decidePolicyForNavigation( | |
| 66 WebKit::WebFrame* frame, | |
| 67 WebKit::WebDataSource::ExtraData* extraData, | |
| 68 const WebKit::WebURLRequest& request, | |
| 69 WebKit::WebNavigationType type, | |
| 70 WebKit::WebNavigationPolicy default_policy, | |
| 71 bool is_redirect); | |
| 72 // DEPRECATED. | |
| 73 virtual WebKit::WebNavigationPolicy decidePolicyForNavigation( | 72 virtual WebKit::WebNavigationPolicy decidePolicyForNavigation( |
| 74 WebKit::WebFrame* frame, | 73 WebKit::WebFrame* frame, |
| 75 const WebKit::WebURLRequest& request, | 74 const WebKit::WebURLRequest& request, |
| 76 WebKit::WebNavigationType type, | 75 WebKit::WebNavigationType type, |
| 77 WebKit::WebNavigationPolicy default_policy, | 76 WebKit::WebNavigationPolicy default_policy, |
| 78 bool is_redirect); | 77 bool is_redirect); |
| 79 virtual WebKit::WebURLError cannotHandleRequestError( | 78 virtual WebKit::WebURLError cannotHandleRequestError( |
| 80 WebKit::WebFrame* frame, | 79 WebKit::WebFrame* frame, |
| 81 const WebKit::WebURLRequest& request); | 80 const WebKit::WebURLRequest& request); |
| 82 virtual WebKit::WebURLError cancelledError( | 81 virtual WebKit::WebURLError cancelledError( |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 WebKit::WebFrame* frame, | 200 WebKit::WebFrame* frame, |
| 202 const WebKit::WebURL& url); | 201 const WebKit::WebURL& url); |
| 203 virtual WebKit::WebString doNotTrackValue(WebKit::WebFrame* frame); | 202 virtual WebKit::WebString doNotTrackValue(WebKit::WebFrame* frame); |
| 204 virtual bool allowWebGL(WebKit::WebFrame* frame, bool default_value); | 203 virtual bool allowWebGL(WebKit::WebFrame* frame, bool default_value); |
| 205 virtual void didLoseWebGLContext(WebKit::WebFrame* frame, | 204 virtual void didLoseWebGLContext(WebKit::WebFrame* frame, |
| 206 int arb_robustness_status_code); | 205 int arb_robustness_status_code); |
| 207 | 206 |
| 208 // RenderFrameImpl methods | 207 // RenderFrameImpl methods |
| 209 int routing_id() { return routing_id_; } | 208 int routing_id() { return routing_id_; } |
| 210 | 209 |
| 210 protected: |
| 211 RenderFrameImpl(RenderViewImpl* render_view, int32 routing_id); |
| 212 |
| 211 private: | 213 private: |
| 212 RenderViewImpl* render_view_; | 214 RenderViewImpl* render_view_; |
| 213 int routing_id_; | 215 int routing_id_; |
| 214 | 216 |
| 215 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); | 217 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); |
| 216 }; | 218 }; |
| 217 | 219 |
| 218 } // namespace content | 220 } // namespace content |
| 219 | 221 |
| 220 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 222 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
| OLD | NEW |