• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 package org.chromium.content.browser;
6 
7 import android.content.Context;
8 import android.os.Bundle;
9 import android.view.accessibility.AccessibilityNodeProvider;
10 
11 /**
12  * A version of {@link ContentView} that supports JellyBean features.
13  */
14 class JellyBeanContentView extends ContentView {
JellyBeanContentView(Context context, ContentViewCore cvc)15     JellyBeanContentView(Context context, ContentViewCore cvc) {
16         super(context, cvc);
17     }
18 
19     @Override
performAccessibilityAction(int action, Bundle arguments)20     public boolean performAccessibilityAction(int action, Bundle arguments) {
21         if (mContentViewCore.supportsAccessibilityAction(action)) {
22             return mContentViewCore.performAccessibilityAction(action, arguments);
23         }
24 
25         return super.performAccessibilityAction(action, arguments);
26     }
27 
28     @Override
getAccessibilityNodeProvider()29     public AccessibilityNodeProvider getAccessibilityNodeProvider() {
30         AccessibilityNodeProvider provider = mContentViewCore.getAccessibilityNodeProvider();
31         if (provider != null) {
32             return provider;
33         } else {
34             return super.getAccessibilityNodeProvider();
35         }
36     }
37 }
38