OLD | NEW |
---|---|
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_RENDERER_RENDER_FRAME_PROXY_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_FRAME_PROXY_H_ |
6 #define CONTENT_RENDERER_RENDER_FRAME_PROXY_H_ | 6 #define CONTENT_RENDERER_RENDER_FRAME_PROXY_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
111 void DidCommitCompositorFrame(); | 111 void DidCommitCompositorFrame(); |
112 | 112 |
113 // Pass replicated information, such as security origin, to this | 113 // Pass replicated information, such as security origin, to this |
114 // RenderFrameProxy's WebRemoteFrame. | 114 // RenderFrameProxy's WebRemoteFrame. |
115 void SetReplicatedState(const FrameReplicationState& state); | 115 void SetReplicatedState(const FrameReplicationState& state); |
116 | 116 |
117 int routing_id() { return routing_id_; } | 117 int routing_id() { return routing_id_; } |
118 RenderViewImpl* render_view() { return render_view_; } | 118 RenderViewImpl* render_view() { return render_view_; } |
119 blink::WebRemoteFrame* web_frame() { return web_frame_; } | 119 blink::WebRemoteFrame* web_frame() { return web_frame_; } |
120 | 120 |
121 void set_provisional_frame_routing_id(int routing_id) { | |
122 provisional_frame_routing_id_ = routing_id; | |
123 } | |
124 | |
125 int provisional_frame_routing_id() { return provisional_frame_routing_id_; } | |
126 | |
121 // Returns the widget used for the local frame root. | 127 // Returns the widget used for the local frame root. |
122 RenderWidget* render_widget() { return render_widget_; } | 128 RenderWidget* render_widget() { return render_widget_; } |
123 | 129 |
124 // blink::WebRemoteFrameClient implementation: | 130 // blink::WebRemoteFrameClient implementation: |
125 void frameDetached(DetachType type) override; | 131 void frameDetached(DetachType type) override; |
126 void forwardPostMessage(blink::WebLocalFrame* sourceFrame, | 132 void forwardPostMessage(blink::WebLocalFrame* sourceFrame, |
127 blink::WebRemoteFrame* targetFrame, | 133 blink::WebRemoteFrame* targetFrame, |
128 blink::WebSecurityOrigin target, | 134 blink::WebSecurityOrigin target, |
129 blink::WebDOMMessageEvent event) override; | 135 blink::WebDOMMessageEvent event) override; |
130 void navigate(const blink::WebURLRequest& request, | 136 void navigate(const blink::WebURLRequest& request, |
131 bool should_replace_current_entry) override; | 137 bool should_replace_current_entry) override; |
132 void forwardInputEvent(const blink::WebInputEvent* event) override; | 138 void forwardInputEvent(const blink::WebInputEvent* event) override; |
133 void frameRectsChanged(const blink::WebRect& frame_rect) override; | 139 void frameRectsChanged(const blink::WebRect& frame_rect) override; |
134 void visibilityChanged(bool visible) override; | 140 void visibilityChanged(bool visible) override; |
135 void setHasReceivedUserGesture() override; | 141 void setHasReceivedUserGesture() override; |
136 void didChangeOpener(blink::WebFrame* opener) override; | 142 void didChangeOpener(blink::WebFrame* opener) override; |
137 void advanceFocus(blink::WebFocusType type, | 143 void advanceFocus(blink::WebFocusType type, |
138 blink::WebLocalFrame* source) override; | 144 blink::WebLocalFrame* source) override; |
139 void frameFocused() override; | 145 void frameFocused() override; |
140 | 146 |
141 // IPC handlers | 147 // IPC handlers |
142 void OnDidStartLoading(); | 148 void OnDidStartLoading(); |
143 | 149 |
144 private: | 150 private: |
145 RenderFrameProxy(int routing_id, int frame_routing_id); | 151 RenderFrameProxy(int routing_id); |
146 | 152 |
147 void Init(blink::WebRemoteFrame* frame, | 153 void Init(blink::WebRemoteFrame* frame, |
148 RenderViewImpl* render_view, | 154 RenderViewImpl* render_view, |
149 RenderWidget* render_widget); | 155 RenderWidget* render_widget); |
150 | 156 |
151 // IPC::Listener | 157 // IPC::Listener |
152 bool OnMessageReceived(const IPC::Message& msg) override; | 158 bool OnMessageReceived(const IPC::Message& msg) override; |
153 | 159 |
154 // IPC handlers | 160 // IPC handlers |
155 void OnDeleteProxy(); | 161 void OnDeleteProxy(); |
(...skipping 14 matching lines...) Expand all Loading... | |
170 void OnSetFrameOwnerProperties(const FrameOwnerProperties& properties); | 176 void OnSetFrameOwnerProperties(const FrameOwnerProperties& properties); |
171 void OnDidUpdateOrigin(const url::Origin& origin, | 177 void OnDidUpdateOrigin(const url::Origin& origin, |
172 bool is_potentially_trustworthy_unique_origin); | 178 bool is_potentially_trustworthy_unique_origin); |
173 void OnSetPageFocus(bool is_focused); | 179 void OnSetPageFocus(bool is_focused); |
174 void OnSetFocusedFrame(); | 180 void OnSetFocusedFrame(); |
175 void OnWillEnterFullscreen(); | 181 void OnWillEnterFullscreen(); |
176 | 182 |
177 // The routing ID by which this RenderFrameProxy is known. | 183 // The routing ID by which this RenderFrameProxy is known. |
178 const int routing_id_; | 184 const int routing_id_; |
179 | 185 |
180 // The routing ID of the local RenderFrame (if any) which this | 186 // The routing ID of the provisional RenderFrame (if any) that is meant to |
181 // RenderFrameProxy is meant to replace in the frame tree. | 187 // replace this RenderFrameProxy in the frame tree. |
182 const int frame_routing_id_; | 188 int provisional_frame_routing_id_; |
alexmos
2017/01/13 02:26:54
frame_routing_id_ was unused, so I just took it ou
Charlie Reis
2017/01/18 00:18:42
Acknowledged.
| |
183 | 189 |
184 // Stores the WebRemoteFrame we are associated with. | 190 // Stores the WebRemoteFrame we are associated with. |
185 blink::WebRemoteFrame* web_frame_; | 191 blink::WebRemoteFrame* web_frame_; |
186 scoped_refptr<ChildFrameCompositingHelper> compositing_helper_; | 192 scoped_refptr<ChildFrameCompositingHelper> compositing_helper_; |
187 | 193 |
188 RenderViewImpl* render_view_; | 194 RenderViewImpl* render_view_; |
189 RenderWidget* render_widget_; | 195 RenderWidget* render_widget_; |
190 | 196 |
191 DISALLOW_COPY_AND_ASSIGN(RenderFrameProxy); | 197 DISALLOW_COPY_AND_ASSIGN(RenderFrameProxy); |
192 }; | 198 }; |
193 | 199 |
194 } // namespace | 200 } // namespace |
195 | 201 |
196 #endif // CONTENT_RENDERER_RENDER_FRAME_PROXY_H_ | 202 #endif // CONTENT_RENDERER_RENDER_FRAME_PROXY_H_ |
OLD | NEW |