Skip to content

Commit

Permalink
Remove support for connecting to BrailleBack on Android.
Browse files Browse the repository at this point in the history
Except for on ICS, Chrome for Android doesn't inject AndroidVox for
accessibility anymore.  Since BrailleBack only runs on JB+, this code is
now dead.

BUG=426808

Review URL: https://codereview.chromium.org/737133006

Cr-Commit-Position: refs/heads/master@{#306376}
  • Loading branch information
plundblad authored and Commit bot committed Dec 2, 2014
1 parent 2a763f3 commit d7dcc6a
Show file tree
Hide file tree
Showing 11 changed files with 2 additions and 314 deletions.
1 change: 0 additions & 1 deletion BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ group("root") {
"//third_party/android_tools:android_support_v13_java",
"//third_party/android_tools:android_support_v7_appcompat_java",
"//third_party/android_tools:android_support_v7_mediarouter_java",
"//third_party/eyesfree:eyesfree_java",
]

if (has_chrome_android_internal) {
Expand Down
2 changes: 0 additions & 2 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -494,8 +494,6 @@ deps_os = {
'src/third_party/lss':
Var('chromium_git') + '/external/linux-syscall-support/lss.git' + '@' + Var('lss_revision'),

'src/third_party/eyesfree/src/android/java/src/com/googlecode/eyesfree/braille':
Var('chromium_git') + '/external/eyes-free/braille/client/src/com/googlecode/eyesfree/braille.git' + '@' + '77bf6edb0138e3a38a2772248696f130dab45e34',
},
}

Expand Down
7 changes: 0 additions & 7 deletions content/content.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -461,13 +461,6 @@
'R_package': 'org.chromium.content',
'R_package_relpath': 'org/chromium/content',
},
'conditions': [
['android_webview_build == 0', {
'dependencies': [
'../third_party/eyesfree/eyesfree.gyp:eyesfree_java',
],
}],
],
'includes': [ '../build/java.gypi' ],
},
{
Expand Down
5 changes: 0 additions & 5 deletions content/public/android/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@ android_library("content_java") {
]

DEPRECATED_java_in_dir = "java/src"
if (!is_android_webview_build) {
deps += [
"//third_party/eyesfree:eyesfree_java",
]
}
}

java_strings_grd("content_strings_grd") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,10 @@
import android.os.Bundle;
import android.os.Vibrator;
import android.speech.tts.TextToSpeech;
import android.util.Log;
import android.view.View;
import android.view.accessibility.AccessibilityManager;
import android.view.accessibility.AccessibilityNodeInfo;

import com.googlecode.eyesfree.braille.selfbraille.SelfBrailleClient;
import com.googlecode.eyesfree.braille.selfbraille.WriteData;

import org.apache.http.NameValuePair;
import org.apache.http.client.utils.URLEncodedUtils;
import org.chromium.base.CommandLine;
Expand All @@ -39,8 +35,6 @@
* Responsible for accessibility injection and management of a {@link ContentViewCore}.
*/
public class AccessibilityInjector extends WebContentsObserver {
private static final String TAG = "AccessibilityInjector";

// The ContentView this injector is responsible for managing.
protected ContentViewCore mContentViewCore;

Expand Down Expand Up @@ -401,14 +395,11 @@ protected TextToSpeechWrapper createTextToSpeechWrapper(View view, Context conte
*/
protected static class TextToSpeechWrapper {
protected final TextToSpeech mTextToSpeech;
private final SelfBrailleClient mSelfBrailleClient;
private final View mView;

protected TextToSpeechWrapper(View view, Context context) {
mView = view;
mTextToSpeech = new TextToSpeech(context, null, null);
mSelfBrailleClient = new SelfBrailleClient(context, CommandLine.getInstance().hasSwitch(
ContentSwitches.ACCESSIBILITY_DEBUG_BRAILLE_SERVICE));
}

@JavascriptInterface
Expand Down Expand Up @@ -455,23 +446,13 @@ public int stop() {
@JavascriptInterface
@SuppressWarnings("unused")
public void braille(String jsonString) {
try {
JSONObject jsonObj = new JSONObject(jsonString);

WriteData data = WriteData.forView(mView);
data.setText(jsonObj.getString("text"));
data.setSelectionStart(jsonObj.getInt("startIndex"));
data.setSelectionEnd(jsonObj.getInt("endIndex"));
mSelfBrailleClient.write(data);
} catch (JSONException ex) {
Log.w(TAG, "Error parsing JS JSON object", ex);
}
// This is here because AndroidVox depends on the existence
// of this method.
}

@SuppressWarnings("unused")
protected void shutdownInternal() {
mTextToSpeech.shutdown();
mSelfBrailleClient.shutdown();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ public abstract class ContentSwitches {
// Change the url of the JavaScript that gets injected when accessibility mode is enabled.
public static final String ACCESSIBILITY_JAVASCRIPT_URL = "accessibility-js-url";

// Whether to ignore signature mismatches when connecting to BrailleBack's
// SelfBrailleService.
public static final String ACCESSIBILITY_DEBUG_BRAILLE_SERVICE = "debug-braille-service";

// Indicates Chrome is running for performance benchmark.
public static final String RUNNING_PERFORMANCE_BENCHMARK =
"running-performance-benchmark";
Expand Down
18 changes: 0 additions & 18 deletions third_party/eyesfree/BUILD.gn

This file was deleted.

203 changes: 0 additions & 203 deletions third_party/eyesfree/LICENSE

This file was deleted.

2 changes: 0 additions & 2 deletions third_party/eyesfree/OWNERS

This file was deleted.

13 changes: 0 additions & 13 deletions third_party/eyesfree/README.chromium

This file was deleted.

38 changes: 0 additions & 38 deletions third_party/eyesfree/eyesfree.gyp

This file was deleted.

0 comments on commit d7dcc6a

Please sign in to comment.