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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 591503003: Allow out-of-process iframes to paint in --site-per-process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "content/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after
1058 // Now that we're swapped out and filtering IPC messages, stop loading to 1058 // Now that we're swapped out and filtering IPC messages, stop loading to
1059 // ensure that no other in-progress navigation continues. We do this here 1059 // ensure that no other in-progress navigation continues. We do this here
1060 // to avoid sending a DidStopLoading message to the browser process. 1060 // to avoid sending a DidStopLoading message to the browser process.
1061 // TODO(creis): Should we be stopping all frames here and using 1061 // TODO(creis): Should we be stopping all frames here and using
1062 // StopAltErrorPageFetcher with RenderView::OnStop, or just stopping this 1062 // StopAltErrorPageFetcher with RenderView::OnStop, or just stopping this
1063 // frame? 1063 // frame?
1064 OnStop(); 1064 OnStop();
1065 1065
1066 // Let subframes know that the frame is now rendered remotely, for the 1066 // Let subframes know that the frame is now rendered remotely, for the
1067 // purposes of compositing and input events. 1067 // purposes of compositing and input events.
1068 if (!is_main_frame) 1068 if (!is_main_frame) {
1069 // TODO(creis): Remove setIsRemote and send initializeChildFrame from the
1070 // RenderFrameProxy, since the RenderFrameHost may be deleted first. In
1071 // the meantime, temporarily set this frame's proxy so that the message
1072 // is sent via RenderFrameProxy.
1073 // See http://crbug.com/416102.
1074 DCHECK(!render_frame_proxy_);
1075 set_render_frame_proxy(proxy);
1069 frame_->setIsRemote(true); 1076 frame_->setIsRemote(true);
1077 set_render_frame_proxy(NULL);
1078 }
1070 1079
1071 // Replace the page with a blank dummy URL. The unload handler will not be 1080 // Replace the page with a blank dummy URL. The unload handler will not be
1072 // run a second time, thanks to a check in FrameLoader::stopLoading. 1081 // run a second time, thanks to a check in FrameLoader::stopLoading.
1073 // TODO(creis): Need to add a better way to do this that avoids running the 1082 // TODO(creis): Need to add a better way to do this that avoids running the
1074 // beforeunload handler. For now, we just run it a second time silently. 1083 // beforeunload handler. For now, we just run it a second time silently.
1075 if (!is_site_per_process || is_main_frame) 1084 if (!is_site_per_process || is_main_frame)
1076 render_view_->NavigateToSwappedOutURL(frame_); 1085 render_view_->NavigateToSwappedOutURL(frame_);
1077 1086
1078 // Let WebKit know that this view is hidden so it can drop resources and 1087 // Let WebKit know that this view is hidden so it can drop resources and
1079 // stop compositing. 1088 // stop compositing.
(...skipping 2095 matching lines...) Expand 10 before | Expand all | Expand 10 after
3175 THREE_D_API_TYPE_WEBGL, 3184 THREE_D_API_TYPE_WEBGL,
3176 arb_robustness_status_code)); 3185 arb_robustness_status_code));
3177 } 3186 }
3178 3187
3179 void RenderFrameImpl::forwardInputEvent(const blink::WebInputEvent* event) { 3188 void RenderFrameImpl::forwardInputEvent(const blink::WebInputEvent* event) {
3180 Send(new FrameHostMsg_ForwardInputEvent(routing_id_, event)); 3189 Send(new FrameHostMsg_ForwardInputEvent(routing_id_, event));
3181 } 3190 }
3182 3191
3183 void RenderFrameImpl::initializeChildFrame(const blink::WebRect& frame_rect, 3192 void RenderFrameImpl::initializeChildFrame(const blink::WebRect& frame_rect,
3184 float scale_factor) { 3193 float scale_factor) {
3185 Send(new FrameHostMsg_InitializeChildFrame( 3194 render_frame_proxy_->Send(new FrameHostMsg_InitializeChildFrame(
3186 routing_id_, frame_rect, scale_factor)); 3195 routing_id_, frame_rect, scale_factor));
3187 } 3196 }
3188 3197
3189 blink::WebScreenOrientationClient* 3198 blink::WebScreenOrientationClient*
3190 RenderFrameImpl::webScreenOrientationClient() { 3199 RenderFrameImpl::webScreenOrientationClient() {
3191 if (!screen_orientation_dispatcher_) 3200 if (!screen_orientation_dispatcher_)
3192 screen_orientation_dispatcher_ = new ScreenOrientationDispatcher(this); 3201 screen_orientation_dispatcher_ = new ScreenOrientationDispatcher(this);
3193 return screen_orientation_dispatcher_; 3202 return screen_orientation_dispatcher_;
3194 } 3203 }
3195 3204
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
3914 3923
3915 #if defined(ENABLE_BROWSER_CDMS) 3924 #if defined(ENABLE_BROWSER_CDMS)
3916 RendererCdmManager* RenderFrameImpl::GetCdmManager() { 3925 RendererCdmManager* RenderFrameImpl::GetCdmManager() {
3917 if (!cdm_manager_) 3926 if (!cdm_manager_)
3918 cdm_manager_ = new RendererCdmManager(this); 3927 cdm_manager_ = new RendererCdmManager(this);
3919 return cdm_manager_; 3928 return cdm_manager_;
3920 } 3929 }
3921 #endif // defined(ENABLE_BROWSER_CDMS) 3930 #endif // defined(ENABLE_BROWSER_CDMS)
3922 3931
3923 } // namespace content 3932 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698