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

Unified Diff: content/browser/renderer_host/render_widget_host_view_android.cc

Issue 2878403002: Support setting mouse cursor icon in Android N. (Closed)
Patch Set: Support setting pointer icon in Android N Created 3 years, 7 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
« no previous file with comments | « no previous file | device/power_save_blocker/BUILD.gn » ('j') | ui/android/BUILD.gn » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_android.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc
index 5df91ac633b973a11e999ae3ba3ac70b89afa603..ef4e72981dc85820220ab1b15732db261fd3dd28 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -77,6 +77,7 @@
#include "ipc/ipc_message_macros.h"
#include "ipc/ipc_message_start.h"
#include "skia/ext/image_operations.h"
+#include "third_party/WebKit/public/platform/WebCursorInfo.h"
#include "third_party/khronos/GLES2/gl2.h"
#include "third_party/khronos/GLES2/gl2ext.h"
#include "third_party/skia/include/core/SkCanvas.h"
@@ -123,6 +124,7 @@ class PendingReadbackLock : public base::RefCounted<PendingReadbackLock> {
using base::android::ApplicationState;
using base::android::ApplicationStatusListener;
+using blink::WebCursorInfo;
class GLHelperHolder {
public:
@@ -707,7 +709,11 @@ float RenderWidgetHostViewAndroid::GetBottomControlsHeight() const {
}
void RenderWidgetHostViewAndroid::UpdateCursor(const WebCursor& cursor) {
- // There are no cursors on Android.
+ CursorInfo cursor_info;
+ cursor.GetCursorInfo(&cursor_info);
+ view_.OnCursorChanged(cursor_info.type == WebCursorInfo::kTypeCustom,
+ cursor_info.type, cursor_info.custom_image,
+ cursor_info.hotspot);
}
void RenderWidgetHostViewAndroid::SetIsLoading(bool is_loading) {
« no previous file with comments | « no previous file | device/power_save_blocker/BUILD.gn » ('j') | ui/android/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698