Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: content/browser/android/content_view_core_impl.cc

Issue 2558933002: Add more fine-grained accessibility modes. (Closed)
Patch Set: Rename constants Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after
1356 manager->SetContentViewCore(GetJavaObject()); 1356 manager->SetContentViewCore(GetJavaObject());
1357 return; 1357 return;
1358 } 1358 }
1359 } 1359 }
1360 1360
1361 // Otherwise, enable accessibility globally unless it was 1361 // Otherwise, enable accessibility globally unless it was
1362 // explicitly disallowed by a command-line flag, then enable it for 1362 // explicitly disallowed by a command-line flag, then enable it for
1363 // this WebContents if that succeeded. 1363 // this WebContents if that succeeded.
1364 accessibility_state->OnScreenReaderDetected(); 1364 accessibility_state->OnScreenReaderDetected();
1365 if (accessibility_state->IsAccessibleBrowser() && web_contents_) 1365 if (accessibility_state->IsAccessibleBrowser() && web_contents_)
1366 web_contents_->AddAccessibilityMode(AccessibilityModeComplete); 1366 web_contents_->AddAccessibilityMode(kAccessibilityModeComplete);
1367 } else { 1367 } else {
1368 accessibility_state->ResetAccessibilityMode(); 1368 accessibility_state->ResetAccessibilityMode();
1369 if (web_contents_) { 1369 if (web_contents_) {
1370 web_contents_->SetAccessibilityMode( 1370 web_contents_->SetAccessibilityMode(
1371 accessibility_state->accessibility_mode()); 1371 accessibility_state->accessibility_mode());
1372 } 1372 }
1373 } 1373 }
1374 } 1374 }
1375 1375
1376 void ContentViewCoreImpl::SendOrientationChangeEventInternal() { 1376 void ContentViewCoreImpl::SendOrientationChangeEventInternal() {
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
1596 return ScopedJavaLocalRef<jobject>(); 1596 return ScopedJavaLocalRef<jobject>();
1597 1597
1598 return view->GetJavaObject(); 1598 return view->GetJavaObject();
1599 } 1599 }
1600 1600
1601 bool RegisterContentViewCore(JNIEnv* env) { 1601 bool RegisterContentViewCore(JNIEnv* env) {
1602 return RegisterNativesImpl(env); 1602 return RegisterNativesImpl(env);
1603 } 1603 }
1604 1604
1605 } // namespace content 1605 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698