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

Side by Side Diff: content/renderer/render_frame_proxy.h

Issue 2628133002: When a proxy is detached, immediately delete its associated provisional frame. (Closed)
Patch Set: Charlie's nit Created 3 years, 11 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
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | content/renderer/render_frame_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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
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 updateRemoteViewportIntersection( 140 void updateRemoteViewportIntersection(
135 const blink::WebRect& viewportIntersection) override; 141 const blink::WebRect& viewportIntersection) override;
136 void visibilityChanged(bool visible) override; 142 void visibilityChanged(bool visible) override;
137 void setHasReceivedUserGesture() override; 143 void setHasReceivedUserGesture() override;
138 void didChangeOpener(blink::WebFrame* opener) override; 144 void didChangeOpener(blink::WebFrame* opener) override;
139 void advanceFocus(blink::WebFocusType type, 145 void advanceFocus(blink::WebFocusType type,
140 blink::WebLocalFrame* source) override; 146 blink::WebLocalFrame* source) override;
141 void frameFocused() override; 147 void frameFocused() override;
142 148
143 // IPC handlers 149 // IPC handlers
144 void OnDidStartLoading(); 150 void OnDidStartLoading();
145 151
146 private: 152 private:
147 RenderFrameProxy(int routing_id, int frame_routing_id); 153 RenderFrameProxy(int routing_id);
148 154
149 void Init(blink::WebRemoteFrame* frame, 155 void Init(blink::WebRemoteFrame* frame,
150 RenderViewImpl* render_view, 156 RenderViewImpl* render_view,
151 RenderWidget* render_widget); 157 RenderWidget* render_widget);
152 158
153 // IPC::Listener 159 // IPC::Listener
154 bool OnMessageReceived(const IPC::Message& msg) override; 160 bool OnMessageReceived(const IPC::Message& msg) override;
155 161
156 // IPC handlers 162 // IPC handlers
157 void OnDeleteProxy(); 163 void OnDeleteProxy();
(...skipping 14 matching lines...) Expand all
172 void OnSetFrameOwnerProperties(const FrameOwnerProperties& properties); 178 void OnSetFrameOwnerProperties(const FrameOwnerProperties& properties);
173 void OnDidUpdateOrigin(const url::Origin& origin, 179 void OnDidUpdateOrigin(const url::Origin& origin,
174 bool is_potentially_trustworthy_unique_origin); 180 bool is_potentially_trustworthy_unique_origin);
175 void OnSetPageFocus(bool is_focused); 181 void OnSetPageFocus(bool is_focused);
176 void OnSetFocusedFrame(); 182 void OnSetFocusedFrame();
177 void OnWillEnterFullscreen(); 183 void OnWillEnterFullscreen();
178 184
179 // The routing ID by which this RenderFrameProxy is known. 185 // The routing ID by which this RenderFrameProxy is known.
180 const int routing_id_; 186 const int routing_id_;
181 187
182 // The routing ID of the local RenderFrame (if any) which this 188 // The routing ID of the provisional RenderFrame (if any) that is meant to
183 // RenderFrameProxy is meant to replace in the frame tree. 189 // replace this RenderFrameProxy in the frame tree.
184 const int frame_routing_id_; 190 int provisional_frame_routing_id_;
185 191
186 // Stores the WebRemoteFrame we are associated with. 192 // Stores the WebRemoteFrame we are associated with.
187 blink::WebRemoteFrame* web_frame_; 193 blink::WebRemoteFrame* web_frame_;
188 scoped_refptr<ChildFrameCompositingHelper> compositing_helper_; 194 scoped_refptr<ChildFrameCompositingHelper> compositing_helper_;
189 195
190 RenderViewImpl* render_view_; 196 RenderViewImpl* render_view_;
191 RenderWidget* render_widget_; 197 RenderWidget* render_widget_;
192 198
193 DISALLOW_COPY_AND_ASSIGN(RenderFrameProxy); 199 DISALLOW_COPY_AND_ASSIGN(RenderFrameProxy);
194 }; 200 };
195 201
196 } // namespace 202 } // namespace
197 203
198 #endif // CONTENT_RENDERER_RENDER_FRAME_PROXY_H_ 204 #endif // CONTENT_RENDERER_RENDER_FRAME_PROXY_H_
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | content/renderer/render_frame_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698