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

Side by Side Diff: ui/accessibility/platform/ax_platform_node_auralinux.cc

Issue 1987213002: Clean up code and logic related to platform accessibility node destruction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 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 <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/strings/sys_string_conversions.h" 10 #include "base/strings/sys_string_conversions.h"
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 AXPlatformNodeAuraLinux::~AXPlatformNodeAuraLinux() { 470 AXPlatformNodeAuraLinux::~AXPlatformNodeAuraLinux() {
471 g_object_unref(atk_object_); 471 g_object_unref(atk_object_);
472 } 472 }
473 473
474 void AXPlatformNodeAuraLinux::Init(AXPlatformNodeDelegate* delegate) { 474 void AXPlatformNodeAuraLinux::Init(AXPlatformNodeDelegate* delegate) {
475 // Initialize ATK. 475 // Initialize ATK.
476 AXPlatformNodeBase::Init(delegate); 476 AXPlatformNodeBase::Init(delegate);
477 atk_object_ = ATK_OBJECT(ax_platform_node_auralinux_new(this)); 477 atk_object_ = ATK_OBJECT(ax_platform_node_auralinux_new(this));
478 } 478 }
479 479
480 void AXPlatformNodeAuraLinux::Destroy() {
481 delegate_ = nullptr;
482 delete this;
483 }
484
485 gfx::NativeViewAccessible AXPlatformNodeAuraLinux::GetNativeViewAccessible() { 480 gfx::NativeViewAccessible AXPlatformNodeAuraLinux::GetNativeViewAccessible() {
486 return atk_object_; 481 return atk_object_;
487 } 482 }
488 483
489 void AXPlatformNodeAuraLinux::NotifyAccessibilityEvent(ui::AXEvent event_type) { 484 void AXPlatformNodeAuraLinux::NotifyAccessibilityEvent(ui::AXEvent event_type) {
490 } 485 }
491 486
492 int AXPlatformNodeAuraLinux::GetIndexInParent() { 487 int AXPlatformNodeAuraLinux::GetIndexInParent() {
493 return 0; 488 return 0;
494 } 489 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 529
535 void AXPlatformNodeAuraLinux::GetSize(gint* width, gint* height) { 530 void AXPlatformNodeAuraLinux::GetSize(gint* width, gint* height) {
536 gfx::Rect rect_size = GetData().location; 531 gfx::Rect rect_size = GetData().location;
537 if (width) 532 if (width)
538 *width = rect_size.width(); 533 *width = rect_size.width();
539 if (height) 534 if (height)
540 *height = rect_size.height(); 535 *height = rect_size.height();
541 } 536 }
542 537
543 } // namespace ui 538 } // namespace ui
OLDNEW
« no previous file with comments | « ui/accessibility/platform/ax_platform_node_auralinux.h ('k') | ui/accessibility/platform/ax_platform_node_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698