OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "ui/accessibility/platform/ax_platform_node_auralinux.h" | 5 #include "ui/accessibility/platform/ax_platform_node_auralinux.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/strings/sys_string_conversions.h" | 8 #include "base/strings/sys_string_conversions.h" |
9 #include "base/task_runner.h" | 9 #include "base/task_runner.h" |
10 #include "ui/accessibility/ax_node_data.h" | 10 #include "ui/accessibility/ax_node_data.h" |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 return atk_state_set; | 183 return atk_state_set; |
184 } | 184 } |
185 | 185 |
186 // | 186 // |
187 // AtkComponent interface | 187 // AtkComponent interface |
188 // | 188 // |
189 | 189 |
190 static gfx::Point FindAtkObjectParentCoords(AtkObject* atk_object) { | 190 static gfx::Point FindAtkObjectParentCoords(AtkObject* atk_object) { |
191 if (atk_object_get_role(atk_object) == ATK_ROLE_WINDOW) { | 191 if (atk_object_get_role(atk_object) == ATK_ROLE_WINDOW) { |
192 int x, y; | 192 int x, y; |
193 atk_component_get_position(ATK_COMPONENT(atk_object), | 193 atk_component_get_extents(ATK_COMPONENT(atk_object), |
194 &x, &y, ATK_XY_WINDOW); | 194 &x, &y, nullptr, nullptr, ATK_XY_WINDOW); |
195 gfx::Point window_coords(x, y); | 195 gfx::Point window_coords(x, y); |
196 return window_coords; | 196 return window_coords; |
197 } | 197 } |
198 atk_object = atk_object_get_parent(atk_object); | 198 atk_object = atk_object_get_parent(atk_object); |
199 | 199 |
200 return FindAtkObjectParentCoords(atk_object); | 200 return FindAtkObjectParentCoords(atk_object); |
201 } | 201 } |
202 | 202 |
203 static void ax_platform_node_auralinux_get_extents(AtkComponent* atk_component, | 203 static void ax_platform_node_auralinux_get_extents(AtkComponent* atk_component, |
204 gint* x, gint* y, | 204 gint* x, gint* y, |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 } | 498 } |
499 } | 499 } |
500 | 500 |
501 void AXPlatformNodeAuraLinux::GetSize(gint* width, gint* height) { | 501 void AXPlatformNodeAuraLinux::GetSize(gint* width, gint* height) { |
502 gfx::Rect rect_size = GetData().location; | 502 gfx::Rect rect_size = GetData().location; |
503 *width = rect_size.width(); | 503 *width = rect_size.width(); |
504 *height = rect_size.height(); | 504 *height = rect_size.height(); |
505 } | 505 } |
506 | 506 |
507 } // namespace ui | 507 } // namespace ui |
OLD | NEW |