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 1220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1231 if (manager) { | 1231 if (manager) { |
1232 manager->SetContentViewCore(GetJavaObject()); | 1232 manager->SetContentViewCore(GetJavaObject()); |
1233 return; | 1233 return; |
1234 } | 1234 } |
1235 } | 1235 } |
1236 | 1236 |
1237 // Otherwise, enable accessibility globally unless it was | 1237 // Otherwise, enable accessibility globally unless it was |
1238 // explicitly disallowed by a command-line flag, then enable it for | 1238 // explicitly disallowed by a command-line flag, then enable it for |
1239 // this WebContents if that succeeded. | 1239 // this WebContents if that succeeded. |
1240 accessibility_state->OnScreenReaderDetected(); | 1240 accessibility_state->OnScreenReaderDetected(); |
1241 if (accessibility_state->IsAccessibleBrowser() && web_contents_) | 1241 if (accessibility_state->IsAccessibleBrowser() && web_contents_) { |
1242 web_contents_->AddAccessibilityMode(ACCESSIBILITY_MODE_COMPLETE); | 1242 web_contents_->AddAccessibilityMode(kAccessibilityModeComplete); |
| 1243 } |
1243 } else { | 1244 } else { |
1244 accessibility_state->ResetAccessibilityMode(); | 1245 accessibility_state->ResetAccessibilityMode(); |
1245 if (web_contents_) { | 1246 if (web_contents_) { |
1246 web_contents_->SetAccessibilityMode( | 1247 web_contents_->SetAccessibilityMode( |
1247 accessibility_state->accessibility_mode()); | 1248 accessibility_state->accessibility_mode()); |
1248 } | 1249 } |
1249 } | 1250 } |
1250 } | 1251 } |
1251 | 1252 |
1252 void ContentViewCoreImpl::SendOrientationChangeEventInternal() { | 1253 void ContentViewCoreImpl::SendOrientationChangeEventInternal() { |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1409 return ScopedJavaLocalRef<jobject>(); | 1410 return ScopedJavaLocalRef<jobject>(); |
1410 | 1411 |
1411 return view->GetJavaObject(); | 1412 return view->GetJavaObject(); |
1412 } | 1413 } |
1413 | 1414 |
1414 bool RegisterContentViewCore(JNIEnv* env) { | 1415 bool RegisterContentViewCore(JNIEnv* env) { |
1415 return RegisterNativesImpl(env); | 1416 return RegisterNativesImpl(env); |
1416 } | 1417 } |
1417 | 1418 |
1418 } // namespace content | 1419 } // namespace content |
OLD | NEW |