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

Side by Side Diff: content/browser/frame_host/cross_process_frame_connector.cc

Issue 270883003: Decouple RVH creation from CrossProcessFrameConnector. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Some more cleanup and fixes. Created 6 years, 7 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 #include "content/browser/frame_host/cross_process_frame_connector.h" 5 #include "content/browser/frame_host/cross_process_frame_connector.h"
6 6
7 #include "content/browser/frame_host/render_frame_host_impl.h" 7 #include "content/browser/frame_host/render_frame_host_impl.h"
8 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" 8 #include "content/browser/frame_host/render_widget_host_view_child_frame.h"
9 #include "content/browser/renderer_host/render_view_host_impl.h" 9 #include "content/browser/renderer_host/render_view_host_impl.h"
10 #include "content/browser/renderer_host/render_widget_host_impl.h" 10 #include "content/browser/renderer_host/render_widget_host_impl.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 } 47 }
48 48
49 void CrossProcessFrameConnector::set_view( 49 void CrossProcessFrameConnector::set_view(
50 RenderWidgetHostViewChildFrame* view) { 50 RenderWidgetHostViewChildFrame* view) {
51 // Detach ourselves from the previous |view_|. 51 // Detach ourselves from the previous |view_|.
52 if (view_) 52 if (view_)
53 view_->set_cross_process_frame_connector(NULL); 53 view_->set_cross_process_frame_connector(NULL);
54 54
55 view_ = view; 55 view_ = view;
56 56
57 // Attach ourselves to the new view. 57 // Attach ourselves to the new view and size it appropriately.
58 if (view_) 58 if (view_) {
59 view_->set_cross_process_frame_connector(this); 59 view_->set_cross_process_frame_connector(this);
60 OnInitializeChildFrame(child_frame_rect_, device_scale_factor_);
ncarter (slow) 2014/05/10 00:32:43 |device_scale_factor_| will be ignored by OnInitia
nasko 2014/05/16 16:17:30 Done.
61 }
60 } 62 }
61 63
62 void CrossProcessFrameConnector::RenderProcessGone() { 64 void CrossProcessFrameConnector::RenderProcessGone() {
63 frame_proxy_in_parent_renderer_->Send(new FrameMsg_ChildFrameProcessGone( 65 frame_proxy_in_parent_renderer_->Send(new FrameMsg_ChildFrameProcessGone(
64 frame_proxy_in_parent_renderer_->routing_id())); 66 frame_proxy_in_parent_renderer_->routing_id()));
65 } 67 }
66 68
67 void CrossProcessFrameConnector::ChildFrameBuffersSwapped( 69 void CrossProcessFrameConnector::ChildFrameBuffersSwapped(
68 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& gpu_params, 70 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& gpu_params,
69 int gpu_host_id) { 71 int gpu_host_id) {
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 } 172 }
171 173
172 if (event->type == blink::WebInputEvent::MouseWheel) { 174 if (event->type == blink::WebInputEvent::MouseWheel) {
173 child_widget->ForwardWheelEvent( 175 child_widget->ForwardWheelEvent(
174 *static_cast<const blink::WebMouseWheelEvent*>(event)); 176 *static_cast<const blink::WebMouseWheelEvent*>(event));
175 return; 177 return;
176 } 178 }
177 } 179 }
178 180
179 } // namespace content 181 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698