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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
257 | 257 |
258 AtkObject* atk_object = ATK_OBJECT(atk_component); | 258 AtkObject* atk_object = ATK_OBJECT(atk_component); |
259 ui::AXPlatformNodeAuraLinux* obj = | 259 ui::AXPlatformNodeAuraLinux* obj = |
260 AtkObjectToAXPlatformNodeAuraLinux(atk_object); | 260 AtkObjectToAXPlatformNodeAuraLinux(atk_object); |
261 if (!obj) | 261 if (!obj) |
262 return; | 262 return; |
263 | 263 |
264 obj->GetSize(width, height); | 264 obj->GetSize(width, height); |
265 } | 265 } |
266 | 266 |
267 static gboolean ax_platform_node_auralinux_grab_focus( | |
268 AtkComponent* atk_component) { | |
269 g_return_val_if_fail(ATK_IS_COMPONENT(atk_component), FALSE); | |
270 | |
271 return atk_component_grab_focus(atk_component); | |
dmazzoni
2015/07/21 15:49:01
You're implementing atk_component_grab_focus for o
| |
272 } | |
273 | |
267 void ax_component_interface_base_init(AtkComponentIface* iface) { | 274 void ax_component_interface_base_init(AtkComponentIface* iface) { |
268 iface->get_extents = ax_platform_node_auralinux_get_extents; | 275 iface->get_extents = ax_platform_node_auralinux_get_extents; |
269 iface->get_position = ax_platform_node_auralinux_get_position; | 276 iface->get_position = ax_platform_node_auralinux_get_position; |
270 iface->get_size = ax_platform_node_auralinux_get_size; | 277 iface->get_size = ax_platform_node_auralinux_get_size; |
278 iface->grab_focus = ax_platform_node_auralinux_grab_focus; | |
271 } | 279 } |
272 | 280 |
273 static const GInterfaceInfo ComponentInfo = { | 281 static const GInterfaceInfo ComponentInfo = { |
274 reinterpret_cast<GInterfaceInitFunc>(ax_component_interface_base_init), 0, 0 | 282 reinterpret_cast<GInterfaceInitFunc>(ax_component_interface_base_init), 0, 0 |
275 }; | 283 }; |
276 | 284 |
277 // | 285 // |
278 // The rest of the AXPlatformNodeAuraLinux code, not specific to one | 286 // The rest of the AXPlatformNodeAuraLinux code, not specific to one |
279 // of the Atk* interfaces. | 287 // of the Atk* interfaces. |
280 // | 288 // |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
531 | 539 |
532 void AXPlatformNodeAuraLinux::GetSize(gint* width, gint* height) { | 540 void AXPlatformNodeAuraLinux::GetSize(gint* width, gint* height) { |
533 gfx::Rect rect_size = GetData().location; | 541 gfx::Rect rect_size = GetData().location; |
534 if (width) | 542 if (width) |
535 *width = rect_size.width(); | 543 *width = rect_size.width(); |
536 if (height) | 544 if (height) |
537 *height = rect_size.height(); | 545 *height = rect_size.height(); |
538 } | 546 } |
539 | 547 |
540 } // namespace ui | 548 } // namespace ui |
OLD | NEW |