Chromium Code Reviews| Index: content/browser/frame_host/cross_process_frame_connector.cc |
| diff --git a/content/browser/frame_host/cross_process_frame_connector.cc b/content/browser/frame_host/cross_process_frame_connector.cc |
| index 7fb24a48369efd96ff93e12856228f36584d5684..a73f15b8ff99406c50e2f653f707dd0483999d7f 100644 |
| --- a/content/browser/frame_host/cross_process_frame_connector.cc |
| +++ b/content/browser/frame_host/cross_process_frame_connector.cc |
| @@ -7,6 +7,7 @@ |
| #include "cc/surfaces/surface.h" |
| #include "cc/surfaces/surface_manager.h" |
| #include "content/browser/compositor/surface_utils.h" |
| +#include "content/browser/frame_host/frame_tree.h" |
| #include "content/browser/frame_host/frame_tree_node.h" |
| #include "content/browser/frame_host/render_frame_host_manager.h" |
| #include "content/browser/frame_host/render_frame_proxy_host.h" |
| @@ -163,6 +164,12 @@ void CrossProcessFrameConnector::GetScreenInfo(blink::WebScreenInfo* results) { |
| static_cast<RenderWidgetHostViewBase*>(rwhv)->GetScreenInfo(results); |
| } |
| +void CrossProcessFrameConnector::UpdateCursor(const WebCursor& cursor) { |
| + RenderWidgetHostViewBase* root_view = GetRootRenderWidgetHostView(); |
| + if (root_view) |
| + root_view->UpdateCursor(cursor); |
| +} |
| + |
| void CrossProcessFrameConnector::OnForwardInputEvent( |
| const blink::WebInputEvent* event) { |
| if (!view_) |
| @@ -218,4 +225,17 @@ void CrossProcessFrameConnector::SetSize(gfx::Rect frame_rect) { |
| view_->SetSize(frame_rect.size()); |
| } |
| +RenderWidgetHostViewBase* |
| +CrossProcessFrameConnector::GetRootRenderWidgetHostView() { |
| + if (frame_proxy_in_parent_renderer_->frame_tree_node()) { |
|
nasko
2015/10/05 18:18:46
RenderFrameProxyHost should always have a FrameTre
kenrb
2015/10/06 17:39:19
I don't think we need to check that either. I have
|
| + return static_cast<RenderWidgetHostViewBase*>( |
| + frame_proxy_in_parent_renderer_->frame_tree_node() |
| + ->frame_tree() |
| + ->root() |
| + ->current_frame_host() |
| + ->GetView()); |
| + } |
| + return nullptr; |
|
nasko
2015/10/05 18:18:46
Inverting the if to return immediately a nullptr a
|
| +} |
| + |
| } // namespace content |