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

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

Issue 1980133002: Implement pointer lock API for out-of-process iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressing comments Created 4 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
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.h" 10 #include "content/browser/frame_host/frame_tree.h"
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 return root_view->HasFocus(); 184 return root_view->HasFocus();
185 return false; 185 return false;
186 } 186 }
187 187
188 void CrossProcessFrameConnector::FocusRootView() { 188 void CrossProcessFrameConnector::FocusRootView() {
189 RenderWidgetHostViewBase* root_view = GetRootRenderWidgetHostView(); 189 RenderWidgetHostViewBase* root_view = GetRootRenderWidgetHostView();
190 if (root_view) 190 if (root_view)
191 root_view->Focus(); 191 root_view->Focus();
192 } 192 }
193 193
194 bool CrossProcessFrameConnector::LockMouse() {
195 RenderWidgetHostViewBase* root_view = GetRootRenderWidgetHostView();
196 if (root_view)
197 return root_view->LockMouse();
198 return false;
199 }
200
194 void CrossProcessFrameConnector::OnForwardInputEvent( 201 void CrossProcessFrameConnector::OnForwardInputEvent(
195 const blink::WebInputEvent* event) { 202 const blink::WebInputEvent* event) {
196 if (!view_) 203 if (!view_)
197 return; 204 return;
198 205
199 RenderFrameHostManager* manager = 206 RenderFrameHostManager* manager =
200 frame_proxy_in_parent_renderer_->frame_tree_node()->render_manager(); 207 frame_proxy_in_parent_renderer_->frame_tree_node()->render_manager();
201 RenderWidgetHostImpl* parent_widget = 208 RenderWidgetHostImpl* parent_widget =
202 manager->ForInnerDelegate() 209 manager->ForInnerDelegate()
203 ? manager->GetOuterRenderWidgetHostForKeyboardInput() 210 ? manager->GetOuterRenderWidgetHostForKeyboardInput()
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 333
327 if (parent) { 334 if (parent) {
328 return static_cast<RenderWidgetHostViewBase*>( 335 return static_cast<RenderWidgetHostViewBase*>(
329 parent->current_frame_host()->GetView()); 336 parent->current_frame_host()->GetView());
330 } 337 }
331 338
332 return nullptr; 339 return nullptr;
333 } 340 }
334 341
335 } // namespace content 342 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698