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

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

Issue 1413643002: Separate RenderViewHost from RenderWidgetHost, part 2: public implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 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
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 "cc/surfaces/surface.h" 7 #include "cc/surfaces/surface.h"
8 #include "cc/surfaces/surface_manager.h" 8 #include "cc/surfaces/surface_manager.h"
9 #include "content/browser/compositor/surface_utils.h" 9 #include "content/browser/compositor/surface_utils.h"
10 #include "content/browser/frame_host/frame_tree_node.h" 10 #include "content/browser/frame_host/frame_tree_node.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 void CrossProcessFrameConnector::OnForwardInputEvent( 166 void CrossProcessFrameConnector::OnForwardInputEvent(
167 const blink::WebInputEvent* event) { 167 const blink::WebInputEvent* event) {
168 if (!view_) 168 if (!view_)
169 return; 169 return;
170 170
171 RenderFrameHostManager* manager = 171 RenderFrameHostManager* manager =
172 frame_proxy_in_parent_renderer_->frame_tree_node()->render_manager(); 172 frame_proxy_in_parent_renderer_->frame_tree_node()->render_manager();
173 RenderWidgetHostImpl* parent_widget = 173 RenderWidgetHostImpl* parent_widget =
174 manager->ForInnerDelegate() 174 manager->ForInnerDelegate()
175 ? manager->GetOuterRenderWidgetHostForKeyboardInput() 175 ? manager->GetOuterRenderWidgetHostForKeyboardInput()
176 : frame_proxy_in_parent_renderer_->GetRenderViewHost(); 176 : frame_proxy_in_parent_renderer_->GetRenderViewHost()->GetWidget();
177 177
178 if (blink::WebInputEvent::isKeyboardEventType(event->type)) { 178 if (blink::WebInputEvent::isKeyboardEventType(event->type)) {
179 if (!parent_widget->GetLastKeyboardEvent()) 179 if (!parent_widget->GetLastKeyboardEvent())
180 return; 180 return;
181 NativeWebKeyboardEvent keyboard_event( 181 NativeWebKeyboardEvent keyboard_event(
182 *parent_widget->GetLastKeyboardEvent()); 182 *parent_widget->GetLastKeyboardEvent());
183 view_->ProcessKeyboardEvent(keyboard_event); 183 view_->ProcessKeyboardEvent(keyboard_event);
184 return; 184 return;
185 } 185 }
186 186
(...skipping 25 matching lines...) Expand all
212 } 212 }
213 } 213 }
214 214
215 void CrossProcessFrameConnector::SetSize(gfx::Rect frame_rect) { 215 void CrossProcessFrameConnector::SetSize(gfx::Rect frame_rect) {
216 child_frame_rect_ = frame_rect; 216 child_frame_rect_ = frame_rect;
217 if (view_) 217 if (view_)
218 view_->SetSize(frame_rect.size()); 218 view_->SetSize(frame_rect.size());
219 } 219 }
220 220
221 } // namespace content 221 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/devtools/devtools_manager_unittest.cc ('k') | content/browser/frame_host/interstitial_page_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698