| 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_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
| 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
| 12 #include "content/public/browser/render_frame_host.h" | 12 #include "content/public/browser/render_frame_host.h" |
| 13 | 13 |
| 14 class GURL; | 14 class GURL; |
| 15 struct FrameHostMsg_DidFailProvisionalLoadWithError_Params; | 15 struct FrameHostMsg_DidFailProvisionalLoadWithError_Params; |
| 16 | 16 |
| 17 namespace base { | 17 namespace base { |
| 18 class FilePath; | 18 class FilePath; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace content { | 21 namespace content { |
| 22 | 22 |
| 23 class CrossProcessFrameConnector; | 23 class CrossProcessFrameConnector; |
| 24 class FrameTree; | 24 class FrameTree; |
| 25 class FrameTreeNode; | 25 class FrameTreeNode; |
| 26 class RenderFrameHostDelegate; | 26 class RenderFrameHostDelegate; |
| 27 class RenderProcessHost; | 27 class RenderProcessHost; |
| 28 class RenderViewHostImpl; | 28 class RenderViewHostImpl; |
| 29 struct ContextMenuParams; |
| 29 | 30 |
| 30 class CONTENT_EXPORT RenderFrameHostImpl : public RenderFrameHost { | 31 class CONTENT_EXPORT RenderFrameHostImpl : public RenderFrameHost { |
| 31 public: | 32 public: |
| 32 static RenderFrameHostImpl* FromID(int process_id, int routing_id); | 33 static RenderFrameHostImpl* FromID(int process_id, int routing_id); |
| 33 | 34 |
| 34 virtual ~RenderFrameHostImpl(); | 35 virtual ~RenderFrameHostImpl(); |
| 35 | 36 |
| 36 // RenderFrameHost | 37 // RenderFrameHost |
| 37 virtual SiteInstance* GetSiteInstance() OVERRIDE; | 38 virtual SiteInstance* GetSiteInstance() OVERRIDE; |
| 38 virtual RenderProcessHost* GetProcess() OVERRIDE; | 39 virtual RenderProcessHost* GetProcess() OVERRIDE; |
| 39 virtual int GetRoutingID() OVERRIDE; | 40 virtual int GetRoutingID() OVERRIDE; |
| 40 virtual gfx::NativeView GetNativeView() OVERRIDE; | 41 virtual gfx::NativeView GetNativeView() OVERRIDE; |
| 42 virtual void NotifyContextMenuClosed( |
| 43 const CustomContextMenuContext& context) OVERRIDE; |
| 44 virtual void ExecuteCustomContextMenuCommand( |
| 45 int action, const CustomContextMenuContext& context) OVERRIDE; |
| 41 virtual RenderViewHost* GetRenderViewHost() OVERRIDE; | 46 virtual RenderViewHost* GetRenderViewHost() OVERRIDE; |
| 42 | 47 |
| 43 // IPC::Sender | 48 // IPC::Sender |
| 44 virtual bool Send(IPC::Message* msg) OVERRIDE; | 49 virtual bool Send(IPC::Message* msg) OVERRIDE; |
| 45 | 50 |
| 46 // IPC::Listener | 51 // IPC::Listener |
| 47 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 52 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
| 48 | 53 |
| 49 void Init(); | 54 void Init(); |
| 50 int routing_id() const { return routing_id_; } | 55 int routing_id() const { return routing_id_; } |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 void OnDidStartProvisionalLoadForFrame(int64 frame_id, | 104 void OnDidStartProvisionalLoadForFrame(int64 frame_id, |
| 100 int64 parent_frame_id, | 105 int64 parent_frame_id, |
| 101 bool main_frame, | 106 bool main_frame, |
| 102 const GURL& url); | 107 const GURL& url); |
| 103 void OnDidFailProvisionalLoadWithError( | 108 void OnDidFailProvisionalLoadWithError( |
| 104 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params); | 109 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params); |
| 105 void OnDidRedirectProvisionalLoad(int32 page_id, | 110 void OnDidRedirectProvisionalLoad(int32 page_id, |
| 106 const GURL& source_url, | 111 const GURL& source_url, |
| 107 const GURL& target_url); | 112 const GURL& target_url); |
| 108 void OnSwapOutACK(); | 113 void OnSwapOutACK(); |
| 114 void OnContextMenu(const ContextMenuParams& params); |
| 109 | 115 |
| 110 // For now, RenderFrameHosts indirectly keep RenderViewHosts alive via a | 116 // For now, RenderFrameHosts indirectly keep RenderViewHosts alive via a |
| 111 // refcount that calls Shutdown when it reaches zero. This allows each | 117 // refcount that calls Shutdown when it reaches zero. This allows each |
| 112 // RenderFrameHostManager to just care about RenderFrameHosts, while ensuring | 118 // RenderFrameHostManager to just care about RenderFrameHosts, while ensuring |
| 113 // we have a RenderViewHost for each RenderFrameHost. | 119 // we have a RenderViewHost for each RenderFrameHost. |
| 114 // TODO(creis): RenderViewHost will eventually go away and be replaced with | 120 // TODO(creis): RenderViewHost will eventually go away and be replaced with |
| 115 // some form of page context. | 121 // some form of page context. |
| 116 RenderViewHostImpl* render_view_host_; | 122 RenderViewHostImpl* render_view_host_; |
| 117 | 123 |
| 118 RenderFrameHostDelegate* delegate_; | 124 RenderFrameHostDelegate* delegate_; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 139 | 145 |
| 140 int routing_id_; | 146 int routing_id_; |
| 141 bool is_swapped_out_; | 147 bool is_swapped_out_; |
| 142 | 148 |
| 143 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 149 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
| 144 }; | 150 }; |
| 145 | 151 |
| 146 } // namespace content | 152 } // namespace content |
| 147 | 153 |
| 148 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 154 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
| OLD | NEW |