| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #import "ui/accessibility/platform/ax_platform_node_mac.h" | 5 #import "ui/accessibility/platform/ax_platform_node_mac.h" |
| 6 | 6 |
| 7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 | 318 |
| 319 AXPlatformNodeMac::AXPlatformNodeMac() { | 319 AXPlatformNodeMac::AXPlatformNodeMac() { |
| 320 } | 320 } |
| 321 | 321 |
| 322 AXPlatformNodeMac::~AXPlatformNodeMac() { | 322 AXPlatformNodeMac::~AXPlatformNodeMac() { |
| 323 } | 323 } |
| 324 | 324 |
| 325 void AXPlatformNodeMac::Destroy() { | 325 void AXPlatformNodeMac::Destroy() { |
| 326 if (native_node_) | 326 if (native_node_) |
| 327 [native_node_ detach]; | 327 [native_node_ detach]; |
| 328 delegate_ = nullptr; | 328 AXPlatformNodeBase::Destroy(); |
| 329 delete this; | |
| 330 } | 329 } |
| 331 | 330 |
| 332 gfx::NativeViewAccessible AXPlatformNodeMac::GetNativeViewAccessible() { | 331 gfx::NativeViewAccessible AXPlatformNodeMac::GetNativeViewAccessible() { |
| 333 if (!native_node_) | 332 if (!native_node_) |
| 334 native_node_.reset([[AXPlatformNodeCocoa alloc] initWithNode:this]); | 333 native_node_.reset([[AXPlatformNodeCocoa alloc] initWithNode:this]); |
| 335 return native_node_.get(); | 334 return native_node_.get(); |
| 336 } | 335 } |
| 337 | 336 |
| 338 void AXPlatformNodeMac::NotifyAccessibilityEvent(ui::AXEvent event_type) { | 337 void AXPlatformNodeMac::NotifyAccessibilityEvent(ui::AXEvent event_type) { |
| 339 // TODO(dmazzoni): implement this. http://crbug.com/396137 | 338 // TODO(dmazzoni): implement this. http://crbug.com/396137 |
| 340 } | 339 } |
| 341 | 340 |
| 342 int AXPlatformNodeMac::GetIndexInParent() { | 341 int AXPlatformNodeMac::GetIndexInParent() { |
| 343 // TODO(dmazzoni): implement this. http://crbug.com/396137 | 342 // TODO(dmazzoni): implement this. http://crbug.com/396137 |
| 344 return -1; | 343 return -1; |
| 345 } | 344 } |
| 346 | 345 |
| 347 } // namespace ui | 346 } // namespace ui |
| OLD | NEW |