| 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 return root_view->HasFocus(); | 187 return root_view->HasFocus(); |
| 188 return false; | 188 return false; |
| 189 } | 189 } |
| 190 | 190 |
| 191 void CrossProcessFrameConnector::FocusRootView() { | 191 void CrossProcessFrameConnector::FocusRootView() { |
| 192 RenderWidgetHostViewBase* root_view = GetRootRenderWidgetHostView(); | 192 RenderWidgetHostViewBase* root_view = GetRootRenderWidgetHostView(); |
| 193 if (root_view) | 193 if (root_view) |
| 194 root_view->Focus(); | 194 root_view->Focus(); |
| 195 } | 195 } |
| 196 | 196 |
| 197 bool CrossProcessFrameConnector::LockMouse() { |
| 198 RenderWidgetHostViewBase* root_view = GetRootRenderWidgetHostView(); |
| 199 if (root_view) |
| 200 return root_view->LockMouse(); |
| 201 return false; |
| 202 } |
| 203 |
| 197 void CrossProcessFrameConnector::OnForwardInputEvent( | 204 void CrossProcessFrameConnector::OnForwardInputEvent( |
| 198 const blink::WebInputEvent* event) { | 205 const blink::WebInputEvent* event) { |
| 199 if (!view_) | 206 if (!view_) |
| 200 return; | 207 return; |
| 201 | 208 |
| 202 RenderFrameHostManager* manager = | 209 RenderFrameHostManager* manager = |
| 203 frame_proxy_in_parent_renderer_->frame_tree_node()->render_manager(); | 210 frame_proxy_in_parent_renderer_->frame_tree_node()->render_manager(); |
| 204 RenderWidgetHostImpl* parent_widget = | 211 RenderWidgetHostImpl* parent_widget = |
| 205 manager->ForInnerDelegate() | 212 manager->ForInnerDelegate() |
| 206 ? manager->GetOuterRenderWidgetHostForKeyboardInput() | 213 ? manager->GetOuterRenderWidgetHostForKeyboardInput() |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 | 338 |
| 332 if (parent) { | 339 if (parent) { |
| 333 return static_cast<RenderWidgetHostViewBase*>( | 340 return static_cast<RenderWidgetHostViewBase*>( |
| 334 parent->current_frame_host()->GetView()); | 341 parent->current_frame_host()->GetView()); |
| 335 } | 342 } |
| 336 | 343 |
| 337 return nullptr; | 344 return nullptr; |
| 338 } | 345 } |
| 339 | 346 |
| 340 } // namespace content | 347 } // namespace content |
| OLD | NEW |