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

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

Issue 145283003: Switch AccessibilityMode to be a bitmap (Closed) Base URL: https://chromium.googlesource.com/chromium/src@enable
Patch Set: Removed AccessibilityModeFlagRenderer, etc. Created 6 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 "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_array.h" 8 #include "base/android/jni_array.h"
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "base/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
(...skipping 1761 matching lines...) Expand 10 before | Expand all | Expand 10 after
1772 RenderWidgetHostImpl* host_impl = RenderWidgetHostImpl::From( 1772 RenderWidgetHostImpl* host_impl = RenderWidgetHostImpl::From(
1773 host_view->GetRenderWidgetHost()); 1773 host_view->GetRenderWidgetHost());
1774 BrowserAccessibilityState* accessibility_state = 1774 BrowserAccessibilityState* accessibility_state =
1775 BrowserAccessibilityState::GetInstance(); 1775 BrowserAccessibilityState::GetInstance();
1776 if (enabled) { 1776 if (enabled) {
1777 // This enables accessibility globally unless it was explicitly disallowed 1777 // This enables accessibility globally unless it was explicitly disallowed
1778 // by a command-line flag. 1778 // by a command-line flag.
1779 accessibility_state->OnScreenReaderDetected(); 1779 accessibility_state->OnScreenReaderDetected();
1780 // If it was actually enabled globally, enable it for this RenderWidget now. 1780 // If it was actually enabled globally, enable it for this RenderWidget now.
1781 if (accessibility_state->IsAccessibleBrowser() && host_impl) 1781 if (accessibility_state->IsAccessibleBrowser() && host_impl)
1782 host_impl->SetAccessibilityMode(AccessibilityModeComplete); 1782 host_impl->AddAccessibilityMode(AccessibilityModeComplete);
1783 } else { 1783 } else {
1784 accessibility_state->DisableAccessibility(); 1784 accessibility_state->ResetAccessibilityMode();
1785 if (host_impl) 1785 if (host_impl)
1786 host_impl->SetAccessibilityMode(AccessibilityModeOff); 1786 host_impl->ResetAccessibilityMode();
1787 } 1787 }
1788 } 1788 }
1789 1789
1790 void ContentViewCoreImpl::SendSingleTapUma(JNIEnv* env, 1790 void ContentViewCoreImpl::SendSingleTapUma(JNIEnv* env,
1791 jobject obj, 1791 jobject obj,
1792 jint type, 1792 jint type,
1793 jint count) { 1793 jint count) {
1794 UMA_HISTOGRAM_ENUMERATION("Event.SingleTapType", type, count); 1794 UMA_HISTOGRAM_ENUMERATION("Event.SingleTapType", type, count);
1795 } 1795 }
1796 1796
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
1869 reinterpret_cast<ui::ViewAndroid*>(view_android), 1869 reinterpret_cast<ui::ViewAndroid*>(view_android),
1870 reinterpret_cast<ui::WindowAndroid*>(window_android)); 1870 reinterpret_cast<ui::WindowAndroid*>(window_android));
1871 return reinterpret_cast<intptr_t>(view); 1871 return reinterpret_cast<intptr_t>(view);
1872 } 1872 }
1873 1873
1874 bool RegisterContentViewCore(JNIEnv* env) { 1874 bool RegisterContentViewCore(JNIEnv* env) {
1875 return RegisterNativesImpl(env); 1875 return RegisterNativesImpl(env);
1876 } 1876 }
1877 1877
1878 } // namespace content 1878 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698