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_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 | 15 |
| 16 namespace base { | 16 namespace base { |
| 17 class FilePath; | 17 class FilePath; |
| 18 } | 18 } |
| 19 | 19 |
| 20 namespace content { | 20 namespace content { |
| 21 | 21 |
| 22 class CrossProcessFrameConnector; | |
| 22 class FrameTree; | 23 class FrameTree; |
| 23 class FrameTreeNode; | 24 class FrameTreeNode; |
| 24 class RenderFrameHostDelegate; | 25 class RenderFrameHostDelegate; |
| 25 class RenderProcessHost; | 26 class RenderProcessHost; |
| 26 class RenderViewHostImpl; | 27 class RenderViewHostImpl; |
| 27 | 28 |
| 28 class CONTENT_EXPORT RenderFrameHostImpl : public RenderFrameHost { | 29 class CONTENT_EXPORT RenderFrameHostImpl : public RenderFrameHost { |
| 29 public: | 30 public: |
| 30 static RenderFrameHostImpl* FromID(int process_id, int routing_id); | 31 static RenderFrameHostImpl* FromID(int process_id, int routing_id); |
| 31 | 32 |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 44 RenderProcessHost* GetProcess() const; | 45 RenderProcessHost* GetProcess() const; |
| 45 int routing_id() const { return routing_id_; } | 46 int routing_id() const { return routing_id_; } |
| 46 void OnCreateChildFrame(int new_frame_routing_id, | 47 void OnCreateChildFrame(int new_frame_routing_id, |
| 47 int64 parent_frame_id, | 48 int64 parent_frame_id, |
| 48 int64 frame_id, | 49 int64 frame_id, |
| 49 const std::string& frame_name); | 50 const std::string& frame_name); |
| 50 | 51 |
| 51 RenderViewHostImpl* render_view_host() { return render_view_host_; } | 52 RenderViewHostImpl* render_view_host() { return render_view_host_; } |
| 52 RenderFrameHostDelegate* delegate() { return delegate_; } | 53 RenderFrameHostDelegate* delegate() { return delegate_; } |
| 53 | 54 |
| 55 void SetCrossProcessFrameConnector( | |
|
Charlie Reis
2013/12/17 01:09:31
It feels odd to me to have no comments on the publ
awong
2013/12/17 02:45:27
Done.
| |
| 56 CrossProcessFrameConnector* cross_process_frame_connector); | |
| 57 | |
| 54 protected: | 58 protected: |
| 55 friend class RenderFrameHostFactory; | 59 friend class RenderFrameHostFactory; |
| 56 | 60 |
| 57 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost | 61 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost |
| 58 // should be the abstraction needed here, but we need RenderViewHost to pass | 62 // should be the abstraction needed here, but we need RenderViewHost to pass |
| 59 // into WebContentsObserver::FrameDetached for now. | 63 // into WebContentsObserver::FrameDetached for now. |
| 60 RenderFrameHostImpl(RenderViewHostImpl* render_view_host, | 64 RenderFrameHostImpl(RenderViewHostImpl* render_view_host, |
| 61 RenderFrameHostDelegate* delegate, | 65 RenderFrameHostDelegate* delegate, |
| 62 FrameTree* frame_tree, | 66 FrameTree* frame_tree, |
| 63 FrameTreeNode* frame_tree_node, | 67 FrameTreeNode* frame_tree_node, |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 74 bool main_frame, | 78 bool main_frame, |
| 75 const GURL& url); | 79 const GURL& url); |
| 76 | 80 |
| 77 bool is_swapped_out() { return is_swapped_out_; } | 81 bool is_swapped_out() { return is_swapped_out_; } |
| 78 | 82 |
| 79 // TODO(nasko): This should be removed and replaced by RenderProcessHost. | 83 // TODO(nasko): This should be removed and replaced by RenderProcessHost. |
| 80 RenderViewHostImpl* render_view_host_; // Not owned. | 84 RenderViewHostImpl* render_view_host_; // Not owned. |
| 81 | 85 |
| 82 RenderFrameHostDelegate* delegate_; | 86 RenderFrameHostDelegate* delegate_; |
| 83 | 87 |
| 88 // |cross_process_frame_connector_| passes messages from an out-of-process | |
| 89 // child frame to the parent frame. | |
| 90 // | |
| 91 // This is only non-NULL when the RenderFrameHost object is | |
| 92 // (a) swapped out | |
| 93 // (b) has a child frame that | |
|
nasko
2013/12/17 00:56:52
This doesn't end properly, nor does it read cohere
awong
2013/12/17 02:45:27
Yep...sorry...I hadn't gotten this far yet.
| |
| 94 // Object that handles messages destined to a child frame in another | |
| 95 // process from its parent. Non-NULL only when this RenderFrameHost is | |
| 96 // swapped out and corresponds to a direct child frame of a frame in its | |
| 97 // renderer process. | |
| 98 // This will move to RenderFrameProxyHost when that class is created. | |
| 99 CrossProcessFrameConnector* cross_process_frame_connector_; | |
| 100 | |
| 84 // Reference to the whole frame tree that this RenderFrameHost belongs too. | 101 // Reference to the whole frame tree that this RenderFrameHost belongs too. |
| 85 // Allows this RenderFrameHost to add and remove nodes in response to | 102 // Allows this RenderFrameHost to add and remove nodes in response to |
| 86 // messages from the renderer requesting DOM manipulation. | 103 // messages from the renderer requesting DOM manipulation. |
| 87 FrameTree* frame_tree_; | 104 FrameTree* frame_tree_; |
| 88 | 105 |
| 89 // The FrameTreeNode which this RenderFrameHostImpl is hosted in. | 106 // The FrameTreeNode which this RenderFrameHostImpl is hosted in. |
| 90 FrameTreeNode* frame_tree_node_; | 107 FrameTreeNode* frame_tree_node_; |
| 91 | 108 |
| 92 int routing_id_; | 109 int routing_id_; |
| 93 bool is_swapped_out_; | 110 bool is_swapped_out_; |
| 94 | 111 |
| 95 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 112 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
| 96 }; | 113 }; |
| 97 | 114 |
| 98 } // namespace content | 115 } // namespace content |
| 99 | 116 |
| 100 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 117 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
| OLD | NEW |