| 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 return root_view->HasFocus(); | 149 return root_view->HasFocus(); |
| 150 return false; | 150 return false; |
| 151 } | 151 } |
| 152 | 152 |
| 153 void CrossProcessFrameConnector::FocusRootView() { | 153 void CrossProcessFrameConnector::FocusRootView() { |
| 154 RenderWidgetHostViewBase* root_view = GetRootRenderWidgetHostView(); | 154 RenderWidgetHostViewBase* root_view = GetRootRenderWidgetHostView(); |
| 155 if (root_view) | 155 if (root_view) |
| 156 root_view->Focus(); | 156 root_view->Focus(); |
| 157 } | 157 } |
| 158 | 158 |
| 159 bool CrossProcessFrameConnector::LockMouse() { |
| 160 RenderWidgetHostViewBase* root_view = GetRootRenderWidgetHostView(); |
| 161 if (root_view) |
| 162 return root_view->LockMouse(); |
| 163 return false; |
| 164 } |
| 165 |
| 159 void CrossProcessFrameConnector::OnForwardInputEvent( | 166 void CrossProcessFrameConnector::OnForwardInputEvent( |
| 160 const blink::WebInputEvent* event) { | 167 const blink::WebInputEvent* event) { |
| 161 if (!view_) | 168 if (!view_) |
| 162 return; | 169 return; |
| 163 | 170 |
| 164 RenderFrameHostManager* manager = | 171 RenderFrameHostManager* manager = |
| 165 frame_proxy_in_parent_renderer_->frame_tree_node()->render_manager(); | 172 frame_proxy_in_parent_renderer_->frame_tree_node()->render_manager(); |
| 166 RenderWidgetHostImpl* parent_widget = | 173 RenderWidgetHostImpl* parent_widget = |
| 167 manager->ForInnerDelegate() | 174 manager->ForInnerDelegate() |
| 168 ? manager->GetOuterRenderWidgetHostForKeyboardInput() | 175 ? manager->GetOuterRenderWidgetHostForKeyboardInput() |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 | 298 |
| 292 if (parent) { | 299 if (parent) { |
| 293 return static_cast<RenderWidgetHostViewBase*>( | 300 return static_cast<RenderWidgetHostViewBase*>( |
| 294 parent->current_frame_host()->GetView()); | 301 parent->current_frame_host()->GetView()); |
| 295 } | 302 } |
| 296 | 303 |
| 297 return nullptr; | 304 return nullptr; |
| 298 } | 305 } |
| 299 | 306 |
| 300 } // namespace content | 307 } // namespace content |
| OLD | NEW |