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

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 mouse cursor 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') | device/power_save_blocker/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 4d30cc70108004e1293246bc4584406ae55a5acd..68633360da69726226d68078fb2df3cbfe0f34b3 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:
@@ -718,7 +720,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,
boliu 2017/05/19 02:27:57 this parameter is redundant, type is already passe
jaebaek 2017/05/22 12:08:35 Done.
+ 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') | device/power_save_blocker/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698