Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(402)

Side by Side Diff: content/browser/frame_host/render_frame_proxy_host.h

Issue 268543008: Cross-process iframe accessibility. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address feedback Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_PROXY_HOST_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_PROXY_HOST_H_
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_PROXY_HOST_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_PROXY_HOST_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "content/browser/frame_host/render_frame_host_impl.h" 9 #include "content/browser/frame_host/render_frame_host_impl.h"
10 #include "content/browser/site_instance_impl.h" 10 #include "content/browser/site_instance_impl.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 } 64 }
65 65
66 // Initializes the object and creates the RenderFrameProxy in the process 66 // Initializes the object and creates the RenderFrameProxy in the process
67 // for the SiteInstance. 67 // for the SiteInstance.
68 bool InitRenderFrameProxy(); 68 bool InitRenderFrameProxy();
69 69
70 int GetRoutingID() { 70 int GetRoutingID() {
71 return routing_id_; 71 return routing_id_;
72 } 72 }
73 73
74 static RenderFrameProxyHost* FromID(int process_id, int routing_id);
Charlie Reis 2014/08/25 20:58:43 nit: Static method should be first, before the con
dmazzoni 2014/08/26 23:31:03 Done.
75
74 SiteInstance* GetSiteInstance() { 76 SiteInstance* GetSiteInstance() {
75 return site_instance_.get(); 77 return site_instance_.get();
76 } 78 }
77 79
78 void SetChildRWHView(RenderWidgetHostView* view); 80 void SetChildRWHView(RenderWidgetHostView* view);
79 81
80 // TODO(nasko): The following methods should be removed once we don't have a 82 // TODO(nasko): The following methods should be removed once we don't have a
81 // swapped out state on RenderFrameHosts. See https://crbug.com/357747. 83 // swapped out state on RenderFrameHosts. See https://crbug.com/357747.
82 RenderFrameHostImpl* render_frame_host() { 84 RenderFrameHostImpl* render_frame_host() {
83 return render_frame_host_.get(); 85 return render_frame_host_.get();
84 } 86 }
85 RenderViewHostImpl* GetRenderViewHost(); 87 RenderViewHostImpl* GetRenderViewHost();
86 88
87 void TakeFrameHostOwnership( 89 void TakeFrameHostOwnership(
88 scoped_ptr<RenderFrameHostImpl> render_frame_host) { 90 scoped_ptr<RenderFrameHostImpl> render_frame_host) {
89 render_frame_host_ = render_frame_host.Pass(); 91 render_frame_host_ = render_frame_host.Pass();
90 } 92 }
91 scoped_ptr<RenderFrameHostImpl> PassFrameHostOwnership(); 93 scoped_ptr<RenderFrameHostImpl> PassFrameHostOwnership();
92 94
93 // IPC::Sender 95 // IPC::Sender
94 virtual bool Send(IPC::Message* msg) OVERRIDE; 96 virtual bool Send(IPC::Message* msg) OVERRIDE;
95 97
96 // IPC::Listener 98 // IPC::Listener
97 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; 99 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
98 100
99 CrossProcessFrameConnector* cross_process_frame_connector() { 101 CrossProcessFrameConnector* cross_process_frame_connector() {
100 return cross_process_frame_connector_.get(); 102 return cross_process_frame_connector_.get();
101 } 103 }
102 104
105 FrameTreeNode* frame_tree_node() const { return frame_tree_node_; };
Charlie Reis 2014/08/25 20:58:43 nit: This one's fairly fundamental, so let's list
dmazzoni 2014/08/26 23:31:03 Done.
106
103 private: 107 private:
104 // This RenderFrameProxyHost's routing id. 108 // This RenderFrameProxyHost's routing id.
105 int routing_id_; 109 int routing_id_;
106 110
107 // The SiteInstance this proxy is associated with. 111 // The SiteInstance this proxy is associated with.
108 scoped_refptr<SiteInstance> site_instance_; 112 scoped_refptr<SiteInstance> site_instance_;
109 113
110 // The node in the frame tree where this proxy is located. 114 // The node in the frame tree where this proxy is located.
111 FrameTreeNode* frame_tree_node_; 115 FrameTreeNode* frame_tree_node_;
112 116
113 // When a RenderFrameHost is in a different process from its parent in the 117 // When a RenderFrameHost is in a different process from its parent in the
114 // frame tree, this class connects its associated RenderWidgetHostView 118 // frame tree, this class connects its associated RenderWidgetHostView
115 // to this RenderFrameProxyHost, which corresponds to the same frame in the 119 // to this RenderFrameProxyHost, which corresponds to the same frame in the
116 // parent's renderer process. 120 // parent's renderer process.
117 scoped_ptr<CrossProcessFrameConnector> cross_process_frame_connector_; 121 scoped_ptr<CrossProcessFrameConnector> cross_process_frame_connector_;
118 122
119 // TODO(nasko): This can be removed once we don't have a swapped out state on 123 // TODO(nasko): This can be removed once we don't have a swapped out state on
120 // RenderFrameHosts. See https://crbug.com/357747. 124 // RenderFrameHosts. See https://crbug.com/357747.
121 scoped_ptr<RenderFrameHostImpl> render_frame_host_; 125 scoped_ptr<RenderFrameHostImpl> render_frame_host_;
122 126
123 DISALLOW_COPY_AND_ASSIGN(RenderFrameProxyHost); 127 DISALLOW_COPY_AND_ASSIGN(RenderFrameProxyHost);
124 }; 128 };
125 129
126 } // namespace 130 } // namespace
127 131
128 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_PROXY_HOST_H_ 132 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_PROXY_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698