| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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.browser; | 5 package org.chromium.content.browser; |
| 6 | 6 |
| 7 import android.content.Context; | 7 import android.content.Context; |
| 8 import android.os.Bundle; | 8 import android.os.Bundle; |
| 9 import android.util.AttributeSet; | 9 import android.util.AttributeSet; |
| 10 import android.view.View; | 10 import android.view.View; |
| 11 import android.view.accessibility.AccessibilityNodeInfo; | 11 import android.view.accessibility.AccessibilityNodeInfo; |
| 12 import android.view.accessibility.AccessibilityNodeProvider; | 12 import android.view.accessibility.AccessibilityNodeProvider; |
| 13 | 13 |
| 14 import org.chromium.ui.WindowAndroid; | 14 import org.chromium.ui.base.WindowAndroid; |
| 15 | 15 |
| 16 /** | 16 /** |
| 17 * A version of {@link ContentView} that supports JellyBean features. | 17 * A version of {@link ContentView} that supports JellyBean features. |
| 18 */ | 18 */ |
| 19 class JellyBeanContentView extends ContentView { | 19 class JellyBeanContentView extends ContentView { |
| 20 JellyBeanContentView(Context context, int nativeWebContents, WindowAndroid w
indowAndroid, | 20 JellyBeanContentView(Context context, int nativeWebContents, WindowAndroid w
indowAndroid, |
| 21 AttributeSet attrs, int defStyle) { | 21 AttributeSet attrs, int defStyle) { |
| 22 super(context, nativeWebContents, windowAndroid, attrs, defStyle); | 22 super(context, nativeWebContents, windowAndroid, attrs, defStyle); |
| 23 } | 23 } |
| 24 | 24 |
| 25 @Override | 25 @Override |
| 26 public boolean performAccessibilityAction(int action, Bundle arguments) { | 26 public boolean performAccessibilityAction(int action, Bundle arguments) { |
| 27 if (getContentViewCore().supportsAccessibilityAction(action)) { | 27 if (getContentViewCore().supportsAccessibilityAction(action)) { |
| 28 return getContentViewCore().performAccessibilityAction(action, argum
ents); | 28 return getContentViewCore().performAccessibilityAction(action, argum
ents); |
| 29 } | 29 } |
| 30 | 30 |
| 31 return super.performAccessibilityAction(action, arguments); | 31 return super.performAccessibilityAction(action, arguments); |
| 32 } | 32 } |
| 33 | 33 |
| 34 @Override | 34 @Override |
| 35 public AccessibilityNodeProvider getAccessibilityNodeProvider() { | 35 public AccessibilityNodeProvider getAccessibilityNodeProvider() { |
| 36 AccessibilityNodeProvider provider = getContentViewCore().getAccessibili
tyNodeProvider(); | 36 AccessibilityNodeProvider provider = getContentViewCore().getAccessibili
tyNodeProvider(); |
| 37 if (provider != null) { | 37 if (provider != null) { |
| 38 return provider; | 38 return provider; |
| 39 } else { | 39 } else { |
| 40 return super.getAccessibilityNodeProvider(); | 40 return super.getAccessibilityNodeProvider(); |
| 41 } | 41 } |
| 42 } | 42 } |
| 43 } | 43 } |
| OLD | NEW |