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

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

Issue 2393123002: Implement caching asynchronous accessibility hit testing. (Closed)
Patch Set: Made test more robust Created 4 years, 2 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 (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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_auralinux.h" 5 #include "content/browser/accessibility/browser_accessibility_auralinux.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 gint y, 137 gint y,
138 AtkCoordType coord_type) { 138 AtkCoordType coord_type) {
139 g_return_val_if_fail(ATK_IS_COMPONENT(atk_component), 0); 139 g_return_val_if_fail(ATK_IS_COMPONENT(atk_component), 0);
140 140
141 BrowserAccessibilityAuraLinux* obj = 141 BrowserAccessibilityAuraLinux* obj =
142 ToBrowserAccessibilityAuraLinux(atk_component); 142 ToBrowserAccessibilityAuraLinux(atk_component);
143 if (!obj) 143 if (!obj)
144 return NULL; 144 return NULL;
145 145
146 gfx::Point point(x, y); 146 gfx::Point point(x, y);
147 if (!obj->GetScreenBoundsRect().Contains(point)) 147 BrowserAccessibility* result = obj->manager()->CachingAsyncHitTest(point);
148 return NULL;
149
150 BrowserAccessibility* result = obj->BrowserAccessibilityForPoint(point);
151 if (!result) 148 if (!result)
152 return NULL; 149 return NULL;
153 150
154 AtkObject* atk_result = 151 AtkObject* atk_result =
155 ToBrowserAccessibilityAuraLinux(result)->GetAtkObject(); 152 ToBrowserAccessibilityAuraLinux(result)->GetAtkObject();
156 g_object_ref(atk_result); 153 g_object_ref(atk_result);
157 return atk_result; 154 return atk_result;
158 } 155 }
159 156
160 static void browser_accessibility_get_extents(AtkComponent* atk_component, 157 static void browser_accessibility_get_extents(AtkComponent* atk_component,
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 atk_role_ = ATK_ROLE_SECTION; 953 atk_role_ = ATK_ROLE_SECTION;
957 #endif 954 #endif
958 break; 955 break;
959 default: 956 default:
960 atk_role_ = ATK_ROLE_UNKNOWN; 957 atk_role_ = ATK_ROLE_UNKNOWN;
961 break; 958 break;
962 } 959 }
963 } 960 }
964 961
965 } // namespace content 962 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/accessibility/browser_accessibility.cc ('k') | content/browser/accessibility/browser_accessibility_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698