| 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 | 328 |
| 322 if (parent) { | 329 if (parent) { |
| 323 return static_cast<RenderWidgetHostViewBase*>( | 330 return static_cast<RenderWidgetHostViewBase*>( |
| 324 parent->current_frame_host()->GetView()); | 331 parent->current_frame_host()->GetView()); |
| 325 } | 332 } |
| 326 | 333 |
| 327 return nullptr; | 334 return nullptr; |
| 328 } | 335 } |
| 329 | 336 |
| 330 } // namespace content | 337 } // namespace content |
| OLD | NEW |