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

Side by Side Diff: content/shell/android/java/src/org/chromium/content_shell/ShellViewAndroidDelegate.java

Issue 2878403002: Support setting mouse cursor icon in Android N. (Closed)
Patch Set: Support setting mouse cursor icon in Android N Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.content_shell; 5 package org.chromium.content_shell;
6 6
7 import android.os.Build;
8 import android.view.PointerIcon;
7 import android.view.ViewGroup; 9 import android.view.ViewGroup;
8 10
9 import org.chromium.ui.base.ViewAndroidDelegate; 11 import org.chromium.ui.base.ViewAndroidDelegate;
10 12
11 /** 13 /**
12 * Implementation of the abstract class {@link ViewAndroidDelegate} for content shell. 14 * Implementation of the abstract class {@link ViewAndroidDelegate} for content shell.
13 * Extended for testing. 15 * Extended for testing.
14 */ 16 */
15 public class ShellViewAndroidDelegate extends ViewAndroidDelegate { 17 public class ShellViewAndroidDelegate extends ViewAndroidDelegate {
16 private final ViewGroup mContainerView; 18 private final ViewGroup mContainerView;
17 19
18 public ShellViewAndroidDelegate(ViewGroup containerView) { 20 public ShellViewAndroidDelegate(ViewGroup containerView) {
19 mContainerView = containerView; 21 mContainerView = containerView;
20 } 22 }
21 23
22 @Override 24 @Override
23 public ViewGroup getContainerView() { 25 public ViewGroup getContainerView() {
24 return mContainerView; 26 return mContainerView;
25 } 27 }
28
29 @Override
30 public void updatePointerIcon(PointerIcon icon) {
31 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
32 getContainerView().setPointerIcon(icon);
33 }
34 }
26 } 35 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698