| OLD | NEW |
| 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 root_view->Focus(); | 194 root_view->Focus(); |
| 195 } | 195 } |
| 196 | 196 |
| 197 bool CrossProcessFrameConnector::LockMouse() { | 197 bool CrossProcessFrameConnector::LockMouse() { |
| 198 RenderWidgetHostViewBase* root_view = GetRootRenderWidgetHostView(); | 198 RenderWidgetHostViewBase* root_view = GetRootRenderWidgetHostView(); |
| 199 if (root_view) | 199 if (root_view) |
| 200 return root_view->LockMouse(); | 200 return root_view->LockMouse(); |
| 201 return false; | 201 return false; |
| 202 } | 202 } |
| 203 | 203 |
| 204 void CrossProcessFrameConnector::UnlockMouse() { |
| 205 RenderWidgetHostViewBase* root_view = GetRootRenderWidgetHostView(); |
| 206 if (root_view) |
| 207 root_view->UnlockMouse(); |
| 208 } |
| 209 |
| 204 void CrossProcessFrameConnector::OnForwardInputEvent( | 210 void CrossProcessFrameConnector::OnForwardInputEvent( |
| 205 const blink::WebInputEvent* event) { | 211 const blink::WebInputEvent* event) { |
| 206 if (!view_) | 212 if (!view_) |
| 207 return; | 213 return; |
| 208 | 214 |
| 209 RenderFrameHostManager* manager = | 215 RenderFrameHostManager* manager = |
| 210 frame_proxy_in_parent_renderer_->frame_tree_node()->render_manager(); | 216 frame_proxy_in_parent_renderer_->frame_tree_node()->render_manager(); |
| 211 RenderWidgetHostImpl* parent_widget = | 217 RenderWidgetHostImpl* parent_widget = |
| 212 manager->ForInnerDelegate() | 218 manager->ForInnerDelegate() |
| 213 ? manager->GetOuterRenderWidgetHostForKeyboardInput() | 219 ? manager->GetOuterRenderWidgetHostForKeyboardInput() |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 | 344 |
| 339 if (parent) { | 345 if (parent) { |
| 340 return static_cast<RenderWidgetHostViewBase*>( | 346 return static_cast<RenderWidgetHostViewBase*>( |
| 341 parent->current_frame_host()->GetView()); | 347 parent->current_frame_host()->GetView()); |
| 342 } | 348 } |
| 343 | 349 |
| 344 return nullptr; | 350 return nullptr; |
| 345 } | 351 } |
| 346 | 352 |
| 347 } // namespace content | 353 } // namespace content |
| OLD | NEW |