| 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 transformed_point; | 149 return transformed_point; |
| 150 } | 150 } |
| 151 | 151 |
| 152 bool CrossProcessFrameConnector::HasFocus() { | 152 bool CrossProcessFrameConnector::HasFocus() { |
| 153 RenderWidgetHostViewBase* root_view = GetRootRenderWidgetHostView(); | 153 RenderWidgetHostViewBase* root_view = GetRootRenderWidgetHostView(); |
| 154 if (root_view) | 154 if (root_view) |
| 155 return root_view->HasFocus(); | 155 return root_view->HasFocus(); |
| 156 return false; | 156 return false; |
| 157 } | 157 } |
| 158 | 158 |
| 159 void CrossProcessFrameConnector::NotifyRootViewOfTextInputStateChanged() { |
| 160 RenderWidgetHostViewBase* root_view = GetRootRenderWidgetHostView(); |
| 161 if (root_view) |
| 162 root_view->UpdateTextInputState(); |
| 163 } |
| 164 |
| 159 void CrossProcessFrameConnector::OnForwardInputEvent( | 165 void CrossProcessFrameConnector::OnForwardInputEvent( |
| 160 const blink::WebInputEvent* event) { | 166 const blink::WebInputEvent* event) { |
| 161 if (!view_) | 167 if (!view_) |
| 162 return; | 168 return; |
| 163 | 169 |
| 164 RenderFrameHostManager* manager = | 170 RenderFrameHostManager* manager = |
| 165 frame_proxy_in_parent_renderer_->frame_tree_node()->render_manager(); | 171 frame_proxy_in_parent_renderer_->frame_tree_node()->render_manager(); |
| 166 RenderWidgetHostImpl* parent_widget = | 172 RenderWidgetHostImpl* parent_widget = |
| 167 manager->ForInnerDelegate() | 173 manager->ForInnerDelegate() |
| 168 ? manager->GetOuterRenderWidgetHostForKeyboardInput() | 174 ? manager->GetOuterRenderWidgetHostForKeyboardInput() |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 // in the case of nested WebContents. | 249 // in the case of nested WebContents. |
| 244 while (top_host->frame_tree_node()->render_manager()->ForInnerDelegate()) { | 250 while (top_host->frame_tree_node()->render_manager()->ForInnerDelegate()) { |
| 245 top_host = top_host->frame_tree_node()->render_manager()-> | 251 top_host = top_host->frame_tree_node()->render_manager()-> |
| 246 GetOuterDelegateNode()->frame_tree()->root()->current_frame_host(); | 252 GetOuterDelegateNode()->frame_tree()->root()->current_frame_host(); |
| 247 } | 253 } |
| 248 | 254 |
| 249 return static_cast<RenderWidgetHostViewBase*>(top_host->GetView()); | 255 return static_cast<RenderWidgetHostViewBase*>(top_host->GetView()); |
| 250 } | 256 } |
| 251 | 257 |
| 252 } // namespace content | 258 } // namespace content |
| OLD | NEW |