OLD | NEW |
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 } |
OLD | NEW |