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

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

Issue 2692173003: Implemented SetSelection for the Web content on Windows. (Closed)
Patch Set: Fixed another compilation error on Windows. 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/browser_accessibility_manager_android.h" 5 #include "content/browser/accessibility/browser_accessibility_manager_android.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 10
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 } 647 }
648 } 648 }
649 649
650 void BrowserAccessibilityManagerAndroid::SetSelection( 650 void BrowserAccessibilityManagerAndroid::SetSelection(
651 JNIEnv* env, 651 JNIEnv* env,
652 const JavaParamRef<jobject>& obj, 652 const JavaParamRef<jobject>& obj,
653 jint id, 653 jint id,
654 jint start, 654 jint start,
655 jint end) { 655 jint end) {
656 BrowserAccessibilityAndroid* node = GetFromUniqueID(id); 656 BrowserAccessibilityAndroid* node = GetFromUniqueID(id);
657 if (node) 657 if (node) {
658 node->manager()->SetTextSelection(*node, start, end); 658 node->manager()->SetSelection(AXPlatformRange(node->CreatePositionAt(start),
659 node->CreatePositionAt(end)));
660 }
659 } 661 }
660 662
661 jboolean BrowserAccessibilityManagerAndroid::AdjustSlider( 663 jboolean BrowserAccessibilityManagerAndroid::AdjustSlider(
662 JNIEnv* env, 664 JNIEnv* env,
663 const JavaParamRef<jobject>& obj, 665 const JavaParamRef<jobject>& obj,
664 jint id, 666 jint id,
665 jboolean increment) { 667 jboolean increment) {
666 BrowserAccessibilityAndroid* node = GetFromUniqueID(id); 668 BrowserAccessibilityAndroid* node = GetFromUniqueID(id);
667 if (!node) 669 if (!node)
668 return false; 670 return false;
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 986
985 JNIEnv* env = AttachCurrentThread(); 987 JNIEnv* env = AttachCurrentThread();
986 return root_manager->java_ref().get(env); 988 return root_manager->java_ref().get(env);
987 } 989 }
988 990
989 bool RegisterBrowserAccessibilityManager(JNIEnv* env) { 991 bool RegisterBrowserAccessibilityManager(JNIEnv* env) {
990 return RegisterNativesImpl(env); 992 return RegisterNativesImpl(env);
991 } 993 }
992 994
993 } // namespace content 995 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698