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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabBottomBarDelegate.java

Issue 2878403002: Support setting mouse cursor icon in Android N. (Closed)
Patch Set: Override onResolvePointerIcon Created 3 years, 5 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: chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabBottomBarDelegate.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabBottomBarDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabBottomBarDelegate.java
index da51d973acb943aace83cdc495984b961b76fbff..ec03039b47fa16285f80fa62f12cd8bc96e49103 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabBottomBarDelegate.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabBottomBarDelegate.java
@@ -8,7 +8,9 @@ import android.app.PendingIntent;
import android.app.PendingIntent.CanceledException;
import android.content.Intent;
import android.net.Uri;
+import android.os.Build;
import android.support.customtabs.CustomTabsIntent;
+import android.view.PointerIcon;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnLayoutChangeListener;
@@ -155,6 +157,12 @@ class CustomTabBottomBarDelegate implements FullscreenListener {
if (mBottomBarView == null) {
ViewStub bottomBarStub = ((ViewStub) mActivity.findViewById(R.id.bottombar_stub));
mBottomBarView = (ViewGroup) bottomBarStub.inflate();
+
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
+ PointerIcon icon = PointerIcon.getSystemIcon(
+ mBottomBarView.getContext(), PointerIcon.TYPE_ARROW);
+ mBottomBarView.setPointerIcon(icon);
+ }
}
return mBottomBarView;
}

Powered by Google App Engine
This is Rietveld 408576698