Chromium Code Reviews| 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_RENDERER_HOST_RENDER_FRAME_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_FRAME_HOST_IMPL_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_FRAME_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_FRAME_HOST_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | |
| 9 | |
| 8 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 9 #include "content/public/browser/render_frame_host.h" | 11 #include "content/public/browser/render_frame_host.h" |
| 10 | 12 |
| 11 namespace content { | 13 namespace content { |
| 12 | 14 |
| 15 class FrameTree; | |
| 13 class RenderProcessHost; | 16 class RenderProcessHost; |
| 14 class RenderViewHostImpl; | 17 class RenderViewHost; |
| 15 | 18 |
| 16 class CONTENT_EXPORT RenderFrameHostImpl : public RenderFrameHost { | 19 class CONTENT_EXPORT RenderFrameHostImpl : public RenderFrameHost { |
| 17 public: | 20 public: |
| 18 static RenderFrameHostImpl* FromID(int process_id, int routing_id); | 21 static RenderFrameHostImpl* FromID(int process_id, int routing_id); |
| 19 | 22 |
| 20 RenderFrameHostImpl(RenderViewHostImpl* render_view_host, | 23 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost |
|
Charlie Reis
2013/10/02 22:25:19
Can you mention what's blocking this (i.e., needin
nasko
2013/10/02 23:02:06
Done.
| |
| 24 // should be the abstraction needed here. | |
| 25 RenderFrameHostImpl(RenderViewHost* render_view_host, | |
| 26 FrameTree* frame_tree, | |
| 21 int routing_id, | 27 int routing_id, |
| 22 bool is_swapped_out); | 28 bool is_swapped_out); |
| 23 virtual ~RenderFrameHostImpl(); | 29 virtual ~RenderFrameHostImpl(); |
| 24 | 30 |
| 25 // IPC::Sender | 31 // IPC::Sender |
| 26 virtual bool Send(IPC::Message* msg) OVERRIDE; | 32 virtual bool Send(IPC::Message* msg) OVERRIDE; |
| 27 | 33 |
| 28 // IPC::Listener | 34 // IPC::Listener |
| 29 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 35 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
| 30 | 36 |
| 31 void Init(); | 37 void Init(); |
| 32 RenderProcessHost* GetProcess() const; | 38 RenderProcessHost* GetProcess() const; |
| 33 int routing_id() const { return routing_id_; } | 39 int routing_id() const { return routing_id_; } |
| 40 void OnCreateChildFrame(int new_frame_routing_id, | |
| 41 int64 parent_frame_id, | |
| 42 int64 frame_id, | |
| 43 const std::string& frame_name); | |
| 44 | |
| 45 RenderViewHost* render_view_host() { | |
| 46 return render_view_host_; | |
| 47 } | |
| 34 | 48 |
| 35 private: | 49 private: |
| 36 bool is_swapped_out() { return is_swapped_out_; } | 50 bool is_swapped_out() { return is_swapped_out_; } |
| 37 | 51 |
| 38 RenderViewHostImpl* render_view_host_; // Not owned. Outlives this object. | 52 // IPC message handlers. |
| 53 void OnDetach(int64 parent_frame_id, int64 frame_id); | |
| 54 | |
| 55 // TODO(nasko): This should be removed and replaced by RenderProcessHost. | |
| 56 RenderViewHost* render_view_host_; // Not owned. | |
|
Charlie Reis
2013/10/02 22:25:19
nit: One more space before //.
Also, might as wel
nasko
2013/10/02 23:02:06
Done.
| |
| 57 | |
| 58 // Reference to the whole frame tree that this RenderFrameHost belongs too. | |
| 59 // Allows this RenderFrameHost to add and remove nodes in response to | |
| 60 // requests DOM manipulation messages from the renderer. | |
| 61 FrameTree* frame_tree_; | |
| 39 int routing_id_; | 62 int routing_id_; |
| 40 bool is_swapped_out_; | 63 bool is_swapped_out_; |
| 41 | 64 |
| 42 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 65 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
| 43 }; | 66 }; |
| 44 | 67 |
| 45 } // namespace content | 68 } // namespace content |
| 46 | 69 |
| 47 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_FRAME_HOST_IMPL_H_ | 70 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_FRAME_HOST_IMPL_H_ |
| OLD | NEW |