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

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

Issue 2694413006: Scope and clean up uses of AccessibilityMode. (Closed)
Patch Set: address comments Created 3 years, 10 months 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 1364 matching lines...) Expand 10 before | Expand all | Expand 10 after
1375 manager->SetContentViewCore(GetJavaObject()); 1375 manager->SetContentViewCore(GetJavaObject());
1376 return; 1376 return;
1377 } 1377 }
1378 } 1378 }
1379 1379
1380 // Otherwise, enable accessibility globally unless it was 1380 // Otherwise, enable accessibility globally unless it was
1381 // explicitly disallowed by a command-line flag, then enable it for 1381 // explicitly disallowed by a command-line flag, then enable it for
1382 // this WebContents if that succeeded. 1382 // this WebContents if that succeeded.
1383 accessibility_state->OnScreenReaderDetected(); 1383 accessibility_state->OnScreenReaderDetected();
1384 if (accessibility_state->IsAccessibleBrowser() && web_contents_) 1384 if (accessibility_state->IsAccessibleBrowser() && web_contents_)
1385 web_contents_->AddAccessibilityMode(ACCESSIBILITY_MODE_COMPLETE); 1385 web_contents_->AddAccessibilityMode(AccessibilityMode::kComplete);
1386 } else { 1386 } else {
1387 accessibility_state->ResetAccessibilityMode(); 1387 accessibility_state->ResetAccessibilityMode();
1388 if (web_contents_) { 1388 if (web_contents_) {
1389 web_contents_->SetAccessibilityMode( 1389 web_contents_->SetAccessibilityMode(
1390 accessibility_state->accessibility_mode()); 1390 accessibility_state->accessibility_mode());
1391 } 1391 }
1392 } 1392 }
1393 } 1393 }
1394 1394
1395 void ContentViewCoreImpl::SendOrientationChangeEventInternal() { 1395 void ContentViewCoreImpl::SendOrientationChangeEventInternal() {
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
1551 return ScopedJavaLocalRef<jobject>(); 1551 return ScopedJavaLocalRef<jobject>();
1552 1552
1553 return view->GetJavaObject(); 1553 return view->GetJavaObject();
1554 } 1554 }
1555 1555
1556 bool RegisterContentViewCore(JNIEnv* env) { 1556 bool RegisterContentViewCore(JNIEnv* env) {
1557 return RegisterNativesImpl(env); 1557 return RegisterNativesImpl(env);
1558 } 1558 }
1559 1559
1560 } // namespace content 1560 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698