| 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 return transformed_point; | 183 return transformed_point; |
| 184 } | 184 } |
| 185 | 185 |
| 186 bool CrossProcessFrameConnector::HasFocus() { | 186 bool CrossProcessFrameConnector::HasFocus() { |
| 187 RenderWidgetHostViewBase* root_view = GetRootRenderWidgetHostView(); | 187 RenderWidgetHostViewBase* root_view = GetRootRenderWidgetHostView(); |
| 188 if (root_view) | 188 if (root_view) |
| 189 return root_view->HasFocus(); | 189 return root_view->HasFocus(); |
| 190 return false; | 190 return false; |
| 191 } | 191 } |
| 192 | 192 |
| 193 void CrossProcessFrameConnector::NotifyRootViewOfTextInputStateChanged() { |
| 194 RenderWidgetHostViewBase* root_view = GetRootRenderWidgetHostView(); |
| 195 if (root_view) |
| 196 root_view->NotifyTextInputStateChanged(); |
| 197 } |
| 198 |
| 193 void CrossProcessFrameConnector::OnForwardInputEvent( | 199 void CrossProcessFrameConnector::OnForwardInputEvent( |
| 194 const blink::WebInputEvent* event) { | 200 const blink::WebInputEvent* event) { |
| 195 if (!view_) | 201 if (!view_) |
| 196 return; | 202 return; |
| 197 | 203 |
| 198 RenderFrameHostManager* manager = | 204 RenderFrameHostManager* manager = |
| 199 frame_proxy_in_parent_renderer_->frame_tree_node()->render_manager(); | 205 frame_proxy_in_parent_renderer_->frame_tree_node()->render_manager(); |
| 200 RenderWidgetHostImpl* parent_widget = | 206 RenderWidgetHostImpl* parent_widget = |
| 201 manager->ForInnerDelegate() | 207 manager->ForInnerDelegate() |
| 202 ? manager->GetOuterRenderWidgetHostForKeyboardInput() | 208 ? manager->GetOuterRenderWidgetHostForKeyboardInput() |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 // in the case of nested WebContents. | 270 // in the case of nested WebContents. |
| 265 while (top_host->frame_tree_node()->render_manager()->ForInnerDelegate()) { | 271 while (top_host->frame_tree_node()->render_manager()->ForInnerDelegate()) { |
| 266 top_host = top_host->frame_tree_node()->render_manager()-> | 272 top_host = top_host->frame_tree_node()->render_manager()-> |
| 267 GetOuterDelegateNode()->frame_tree()->root()->current_frame_host(); | 273 GetOuterDelegateNode()->frame_tree()->root()->current_frame_host(); |
| 268 } | 274 } |
| 269 | 275 |
| 270 return static_cast<RenderWidgetHostViewBase*>(top_host->GetView()); | 276 return static_cast<RenderWidgetHostViewBase*>(top_host->GetView()); |
| 271 } | 277 } |
| 272 | 278 |
| 273 } // namespace content | 279 } // namespace content |
| OLD | NEW |