OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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.chrome.browser.widget; | 5 package org.chromium.chrome.browser.widget; |
6 | 6 |
7 import android.content.Context; | 7 import android.content.Context; |
| 8 import android.os.Build; |
8 import android.view.LayoutInflater; | 9 import android.view.LayoutInflater; |
| 10 import android.view.PointerIcon; |
9 import android.view.ViewGroup; | 11 import android.view.ViewGroup; |
10 import android.widget.FrameLayout; | 12 import android.widget.FrameLayout; |
11 import android.widget.ListView; | 13 import android.widget.ListView; |
12 | 14 |
13 import org.chromium.base.VisibleForTesting; | 15 import org.chromium.base.VisibleForTesting; |
14 import org.chromium.chrome.R; | 16 import org.chromium.chrome.R; |
15 import org.chromium.chrome.browser.compositor.layouts.Layout; | 17 import org.chromium.chrome.browser.compositor.layouts.Layout; |
16 import org.chromium.chrome.browser.compositor.layouts.LayoutRenderHost; | 18 import org.chromium.chrome.browser.compositor.layouts.LayoutRenderHost; |
17 import org.chromium.chrome.browser.compositor.layouts.LayoutUpdateHost; | 19 import org.chromium.chrome.browser.compositor.layouts.LayoutUpdateHost; |
18 import org.chromium.chrome.browser.compositor.layouts.content.TabContentManager; | 20 import org.chromium.chrome.browser.compositor.layouts.content.TabContentManager; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 mTabModelWrapper = | 52 mTabModelWrapper = |
51 (AccessibilityTabModelWrapper) LayoutInflater.from(container
.getContext()) | 53 (AccessibilityTabModelWrapper) LayoutInflater.from(container
.getContext()) |
52 .inflate(R.layout.accessibility_tab_switcher, null); | 54 .inflate(R.layout.accessibility_tab_switcher, null); |
53 mTabModelWrapper.setup(this); | 55 mTabModelWrapper.setup(this); |
54 mTabModelWrapper.setTabModelSelector(mTabModelSelector); | 56 mTabModelWrapper.setTabModelSelector(mTabModelSelector); |
55 adjustForFullscreen(); | 57 adjustForFullscreen(); |
56 } | 58 } |
57 | 59 |
58 if (container == null || mTabModelWrapper.getParent() != null) return; | 60 if (container == null || mTabModelWrapper.getParent() != null) return; |
59 | 61 |
60 ((ViewGroup) container.findViewById(R.id.overview_list_layout_holder)) | 62 ViewGroup view = (ViewGroup) container.findViewById(R.id.overview_list_l
ayout_holder); |
61 .addView(mTabModelWrapper); | 63 view.addView(mTabModelWrapper); |
| 64 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { |
| 65 PointerIcon icon = PointerIcon.getSystemIcon(view.getContext(), Poin
terIcon.TYPE_ARROW); |
| 66 view.setPointerIcon(icon); |
| 67 } |
62 } | 68 } |
63 | 69 |
64 @Override | 70 @Override |
65 public ViewportMode getViewportMode() { | 71 public ViewportMode getViewportMode() { |
66 return ViewportMode.ALWAYS_FULLSCREEN; | 72 return ViewportMode.ALWAYS_FULLSCREEN; |
67 } | 73 } |
68 | 74 |
69 @Override | 75 @Override |
70 protected void notifySizeChanged(float width, float height, int orientation)
{ | 76 protected void notifySizeChanged(float width, float height, int orientation)
{ |
71 adjustForFullscreen(); | 77 adjustForFullscreen(); |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 @Override | 203 @Override |
198 protected EventFilter getEventFilter() { | 204 protected EventFilter getEventFilter() { |
199 return mBlackHoleEventFilter; | 205 return mBlackHoleEventFilter; |
200 } | 206 } |
201 | 207 |
202 @Override | 208 @Override |
203 protected SceneLayer getSceneLayer() { | 209 protected SceneLayer getSceneLayer() { |
204 return mSceneLayer; | 210 return mSceneLayer; |
205 } | 211 } |
206 } | 212 } |
OLD | NEW |