Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Unified Diff: content/browser/frame_host/cross_process_frame_connector.cc

Issue 1382593004: Allow out-of-process iframes to update the mouse cursor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits addressed Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..be3b39735fbdd480947d93753d5ff6ee79f51e2b 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,14 @@ void CrossProcessFrameConnector::SetSize(gfx::Rect frame_rect) {
view_->SetSize(frame_rect.size());
}
+RenderWidgetHostViewBase*
+CrossProcessFrameConnector::GetRootRenderWidgetHostView() {
+ return static_cast<RenderWidgetHostViewBase*>(
+ frame_proxy_in_parent_renderer_->frame_tree_node()
+ ->frame_tree()
+ ->root()
+ ->current_frame_host()
+ ->GetView());
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698