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

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

Issue 2694413006: Scope and clean up uses of AccessibilityMode. (Closed)
Patch Set: define konstants Created 3 years, 9 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 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 web_contents_->AddAccessibilityMode(kAccessibilityModeComplete);
1366 }
1366 } else { 1367 } else {
1367 accessibility_state->ResetAccessibilityMode(); 1368 accessibility_state->ResetAccessibilityMode();
1368 if (web_contents_) { 1369 if (web_contents_) {
1369 web_contents_->SetAccessibilityMode( 1370 web_contents_->SetAccessibilityMode(
1370 accessibility_state->accessibility_mode()); 1371 accessibility_state->accessibility_mode());
1371 } 1372 }
1372 } 1373 }
1373 } 1374 }
1374 1375
1375 void ContentViewCoreImpl::SendOrientationChangeEventInternal() { 1376 void ContentViewCoreImpl::SendOrientationChangeEventInternal() {
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
1531 return ScopedJavaLocalRef<jobject>(); 1532 return ScopedJavaLocalRef<jobject>();
1532 1533
1533 return view->GetJavaObject(); 1534 return view->GetJavaObject();
1534 } 1535 }
1535 1536
1536 bool RegisterContentViewCore(JNIEnv* env) { 1537 bool RegisterContentViewCore(JNIEnv* env) {
1537 return RegisterNativesImpl(env); 1538 return RegisterNativesImpl(env);
1538 } 1539 }
1539 1540
1540 } // namespace content 1541 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698