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

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

Issue 592263002: Send initializeChildFrame from RenderFrameProxy instead of WebLocalFrame (part 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits Created 6 years, 2 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.h ('k') | content/renderer/render_frame_proxy.h » ('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 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 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after
1056 is_swapped_out_ = true; 1056 is_swapped_out_ = true;
1057 1057
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 // Transfer settings such as initial drawing parameters to the remote frame
1067 // purposes of compositing and input events. 1067 // that will replace this frame.
1068 if (!is_main_frame) { 1068 if (!is_main_frame)
1069 // TODO(creis): Remove setIsRemote and send initializeChildFrame from the 1069 proxy->web_frame()->initializeFromFrame(frame_);
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);
1076 frame_->setIsRemote(true);
1077 set_render_frame_proxy(NULL);
1078 }
1079 1070
1080 // Replace the page with a blank dummy URL. The unload handler will not be 1071 // Replace the page with a blank dummy URL. The unload handler will not be
1081 // run a second time, thanks to a check in FrameLoader::stopLoading. 1072 // run a second time, thanks to a check in FrameLoader::stopLoading.
1082 // TODO(creis): Need to add a better way to do this that avoids running the 1073 // TODO(creis): Need to add a better way to do this that avoids running the
1083 // beforeunload handler. For now, we just run it a second time silently. 1074 // beforeunload handler. For now, we just run it a second time silently.
1084 if (!is_site_per_process || is_main_frame) 1075 if (!is_site_per_process || is_main_frame)
1085 render_view_->NavigateToSwappedOutURL(frame_); 1076 render_view_->NavigateToSwappedOutURL(frame_);
1086 1077
1087 // Let WebKit know that this view is hidden so it can drop resources and 1078 // Let WebKit know that this view is hidden so it can drop resources and
1088 // stop compositing. 1079 // stop compositing.
(...skipping 2093 matching lines...) Expand 10 before | Expand all | Expand 10 after
3182 render_view_->Send(new ViewHostMsg_DidLose3DContext( 3173 render_view_->Send(new ViewHostMsg_DidLose3DContext(
3183 GURL(frame->top()->document().securityOrigin().toString()), 3174 GURL(frame->top()->document().securityOrigin().toString()),
3184 THREE_D_API_TYPE_WEBGL, 3175 THREE_D_API_TYPE_WEBGL,
3185 arb_robustness_status_code)); 3176 arb_robustness_status_code));
3186 } 3177 }
3187 3178
3188 void RenderFrameImpl::forwardInputEvent(const blink::WebInputEvent* event) { 3179 void RenderFrameImpl::forwardInputEvent(const blink::WebInputEvent* event) {
3189 Send(new FrameHostMsg_ForwardInputEvent(routing_id_, event)); 3180 Send(new FrameHostMsg_ForwardInputEvent(routing_id_, event));
3190 } 3181 }
3191 3182
3192 void RenderFrameImpl::initializeChildFrame(const blink::WebRect& frame_rect,
3193 float scale_factor) {
3194 render_frame_proxy_->Send(new FrameHostMsg_InitializeChildFrame(
3195 routing_id_, frame_rect, scale_factor));
3196 }
3197
3198 blink::WebScreenOrientationClient* 3183 blink::WebScreenOrientationClient*
3199 RenderFrameImpl::webScreenOrientationClient() { 3184 RenderFrameImpl::webScreenOrientationClient() {
3200 if (!screen_orientation_dispatcher_) 3185 if (!screen_orientation_dispatcher_)
3201 screen_orientation_dispatcher_ = new ScreenOrientationDispatcher(this); 3186 screen_orientation_dispatcher_ = new ScreenOrientationDispatcher(this);
3202 return screen_orientation_dispatcher_; 3187 return screen_orientation_dispatcher_;
3203 } 3188 }
3204 3189
3205 bool RenderFrameImpl::isControlledByServiceWorker() { 3190 bool RenderFrameImpl::isControlledByServiceWorker() {
3206 // If we're in the middle of committing a load, the data source we need 3191 // If we're in the middle of committing a load, the data source we need
3207 // will still be provisional. 3192 // will still be provisional.
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after
3923 3908
3924 #if defined(ENABLE_BROWSER_CDMS) 3909 #if defined(ENABLE_BROWSER_CDMS)
3925 RendererCdmManager* RenderFrameImpl::GetCdmManager() { 3910 RendererCdmManager* RenderFrameImpl::GetCdmManager() {
3926 if (!cdm_manager_) 3911 if (!cdm_manager_)
3927 cdm_manager_ = new RendererCdmManager(this); 3912 cdm_manager_ = new RendererCdmManager(this);
3928 return cdm_manager_; 3913 return cdm_manager_;
3929 } 3914 }
3930 #endif // defined(ENABLE_BROWSER_CDMS) 3915 #endif // defined(ENABLE_BROWSER_CDMS)
3931 3916
3932 } // namespace content 3917 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | content/renderer/render_frame_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698