Skip to content

Commit

Permalink
Avoid compiling RendererAccessibilityFocusOnly on Android.
Browse files Browse the repository at this point in the history
We're compiling in more accessibility code on Android now,
but this file is never needed, so this cuts down on the
binary size a bit.

BUG=242953
NOTRY=true

Review URL: https://chromiumcodereview.appspot.com/17419003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207189 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
dmazzoni@chromium.org committed Jun 19, 2013
1 parent 2b3ded9 commit 8d3dfee
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions content/content_renderer.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,9 @@
],
}],
['OS=="android"', {
'sources!': [
'renderer/accessibility/renderer_accessibility_focus_only.cc'
],
'dependencies': [
'../third_party/libphonenumber/libphonenumber.gyp:libphonenumber',
],
Expand Down
7 changes: 7 additions & 0 deletions content/renderer/render_view_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5887,8 +5887,10 @@ void RenderViewImpl::OnSetAccessibilityMode(AccessibilityMode new_mode) {
}
if (accessibility_mode_ == AccessibilityModeComplete)
renderer_accessibility_ = new RendererAccessibilityComplete(this);
#if !defined(OS_ANDROID)
else if (accessibility_mode_ == AccessibilityModeEditableTextOnly)
renderer_accessibility_ = new RendererAccessibilityFocusOnly(this);
#endif
}

void RenderViewImpl::OnSetActive(bool active) {
Expand Down Expand Up @@ -6630,6 +6632,11 @@ void RenderViewImpl::OnDisownOpener() {
bool RenderViewImpl::didTapMultipleTargets(
const WebKit::WebGestureEvent& event,
const WebVector<WebRect>& target_rects) {
// Never show a disambiguation popup when accessibility is enabled,
// as this interferes with "touch exploration".
if (accessibility_mode_ == AccessibilityModeComplete)
return false;

gfx::Rect finger_rect(
event.x - event.data.tap.width / 2, event.y - event.data.tap.height / 2,
event.data.tap.width, event.data.tap.height);
Expand Down

0 comments on commit 8d3dfee

Please sign in to comment.