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

Side by Side Diff: content/browser/accessibility/web_contents_accessibility_android.cc

Issue 2934953004: De-templatize ui::AXPosition
Patch Set: rebase Created 3 years, 6 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/accessibility/web_contents_accessibility_android.h" 5 #include "content/browser/accessibility/web_contents_accessibility_android.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "base/feature_list.h" 9 #include "base/feature_list.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 *node, base::android::ConvertJavaStringToUTF16(env, value)); 831 *node, base::android::ConvertJavaStringToUTF16(env, value));
832 } 832 }
833 } 833 }
834 834
835 void WebContentsAccessibilityAndroid::SetSelection( 835 void WebContentsAccessibilityAndroid::SetSelection(
836 JNIEnv* env, 836 JNIEnv* env,
837 const JavaParamRef<jobject>& obj, 837 const JavaParamRef<jobject>& obj,
838 jint unique_id, 838 jint unique_id,
839 jint start, 839 jint start,
840 jint end) { 840 jint end) {
841 using AXPlatformPositionInstance = AXPlatformPosition::AXPositionInstance; 841 using AXPlatformPositionInstance = AXPlatformPosition::ConcreteInstance;
842 using AXPlatformRange = ui::AXRange<AXPlatformPositionInstance::element_type>; 842 using AXPlatformRange = ui::AXRange<AXPlatformPositionInstance::element_type>;
843 843
844 BrowserAccessibilityAndroid* node = GetAXFromUniqueID(unique_id); 844 BrowserAccessibilityAndroid* node = GetAXFromUniqueID(unique_id);
845 if (node) { 845 if (node) {
846 node->manager()->SetSelection(AXPlatformRange(node->CreatePositionAt(start), 846 node->manager()->SetSelection(AXPlatformRange(node->CreatePositionAt(start),
847 node->CreatePositionAt(end))); 847 node->CreatePositionAt(end)));
848 } 848 }
849 } 849 }
850 850
851 jboolean WebContentsAccessibilityAndroid::AdjustSlider( 851 jboolean WebContentsAccessibilityAndroid::AdjustSlider(
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
1177 const JavaParamRef<jobject>& jweb_contents, 1177 const JavaParamRef<jobject>& jweb_contents,
1178 jboolean should_focus_on_page_load) { 1178 jboolean should_focus_on_page_load) {
1179 WebContents* web_contents = WebContents::FromJavaWebContents(jweb_contents); 1179 WebContents* web_contents = WebContents::FromJavaWebContents(jweb_contents);
1180 DCHECK(web_contents); 1180 DCHECK(web_contents);
1181 1181
1182 return reinterpret_cast<intptr_t>(new WebContentsAccessibilityAndroid( 1182 return reinterpret_cast<intptr_t>(new WebContentsAccessibilityAndroid(
1183 env, obj, web_contents, should_focus_on_page_load)); 1183 env, obj, web_contents, should_focus_on_page_load));
1184 } 1184 }
1185 1185
1186 } // namespace content 1186 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/accessibility/browser_accessibility_manager.cc ('k') | ui/accessibility/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698