OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 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 | 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 #include "content/browser/android/content_view_core_impl.h" | 5 #include "content/browser/android/content_view_core_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
10 #include "base/android/jni_array.h" | 10 #include "base/android/jni_array.h" |
(...skipping 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1354 if (manager) { | 1354 if (manager) { |
1355 manager->SetContentViewCore(GetJavaObject()); | 1355 manager->SetContentViewCore(GetJavaObject()); |
1356 return; | 1356 return; |
1357 } | 1357 } |
1358 } | 1358 } |
1359 | 1359 |
1360 // Otherwise, enable accessibility globally unless it was | 1360 // Otherwise, enable accessibility globally unless it was |
1361 // explicitly disallowed by a command-line flag, then enable it for | 1361 // explicitly disallowed by a command-line flag, then enable it for |
1362 // this WebContents if that succeeded. | 1362 // this WebContents if that succeeded. |
1363 accessibility_state->OnScreenReaderDetected(); | 1363 accessibility_state->OnScreenReaderDetected(); |
1364 if (accessibility_state->IsAccessibleBrowser() && web_contents_) | 1364 if (accessibility_state->IsAccessibleBrowser() && web_contents_) { |
1365 web_contents_->AddAccessibilityMode(ACCESSIBILITY_MODE_COMPLETE); | 1365 AccessibilityMode complete_mode( |
| 1366 AccessibilityMode::kNativeAPIs | AccessibilityMode::kWebContents | |
| 1367 AccessibilityMode::kInlineTextBoxes | |
| 1368 AccessibilityMode::kScreenReader | AccessibilityMode::kHTML); |
| 1369 web_contents_->AddAccessibilityMode(complete_mode); |
| 1370 } |
1366 } else { | 1371 } else { |
1367 accessibility_state->ResetAccessibilityMode(); | 1372 accessibility_state->ResetAccessibilityMode(); |
1368 if (web_contents_) { | 1373 if (web_contents_) { |
1369 web_contents_->SetAccessibilityMode( | 1374 web_contents_->SetAccessibilityMode( |
1370 accessibility_state->accessibility_mode()); | 1375 accessibility_state->accessibility_mode()); |
1371 } | 1376 } |
1372 } | 1377 } |
1373 } | 1378 } |
1374 | 1379 |
1375 void ContentViewCoreImpl::SendOrientationChangeEventInternal() { | 1380 void ContentViewCoreImpl::SendOrientationChangeEventInternal() { |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1531 return ScopedJavaLocalRef<jobject>(); | 1536 return ScopedJavaLocalRef<jobject>(); |
1532 | 1537 |
1533 return view->GetJavaObject(); | 1538 return view->GetJavaObject(); |
1534 } | 1539 } |
1535 | 1540 |
1536 bool RegisterContentViewCore(JNIEnv* env) { | 1541 bool RegisterContentViewCore(JNIEnv* env) { |
1537 return RegisterNativesImpl(env); | 1542 return RegisterNativesImpl(env); |
1538 } | 1543 } |
1539 | 1544 |
1540 } // namespace content | 1545 } // namespace content |
OLD | NEW |