| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/views/accessibility/native_view_accessibility_win.h" | 5 #include "ui/views/accessibility/native_view_accessibility_win.h" |
| 6 | 6 |
| 7 #include <oleacc.h> | 7 #include <oleacc.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 namespace views { | 30 namespace views { |
| 31 | 31 |
| 32 // static | 32 // static |
| 33 std::unique_ptr<NativeViewAccessibility> NativeViewAccessibility::Create( | 33 std::unique_ptr<NativeViewAccessibility> NativeViewAccessibility::Create( |
| 34 View* view) { | 34 View* view) { |
| 35 return base::MakeUnique<NativeViewAccessibilityWin>(view); | 35 return base::MakeUnique<NativeViewAccessibilityWin>(view); |
| 36 } | 36 } |
| 37 | 37 |
| 38 NativeViewAccessibilityWin::NativeViewAccessibilityWin(View* view) | 38 NativeViewAccessibilityWin::NativeViewAccessibilityWin(View* view) |
| 39 : NativeViewAccessibility(view) {} | 39 : NativeViewAccessibilityBase(view) {} |
| 40 | 40 |
| 41 NativeViewAccessibilityWin::~NativeViewAccessibilityWin() {} | 41 NativeViewAccessibilityWin::~NativeViewAccessibilityWin() {} |
| 42 | 42 |
| 43 gfx::NativeViewAccessible NativeViewAccessibilityWin::GetParent() { | 43 gfx::NativeViewAccessible NativeViewAccessibilityWin::GetParent() { |
| 44 IAccessible* parent = NativeViewAccessibility::GetParent(); | 44 IAccessible* parent = NativeViewAccessibilityBase::GetParent(); |
| 45 if (parent) | 45 if (parent) |
| 46 return parent; | 46 return parent; |
| 47 | 47 |
| 48 HWND hwnd = HWNDForView(view_); | 48 HWND hwnd = HWNDForView(view_); |
| 49 if (!hwnd) | 49 if (!hwnd) |
| 50 return NULL; | 50 return NULL; |
| 51 | 51 |
| 52 HRESULT hr = ::AccessibleObjectFromWindow( | 52 HRESULT hr = ::AccessibleObjectFromWindow( |
| 53 hwnd, OBJID_WINDOW, IID_IAccessible, | 53 hwnd, OBJID_WINDOW, IID_IAccessible, |
| 54 reinterpret_cast<void**>(&parent)); | 54 reinterpret_cast<void**>(&parent)); |
| 55 if (SUCCEEDED(hr)) | 55 if (SUCCEEDED(hr)) |
| 56 return parent; | 56 return parent; |
| 57 | 57 |
| 58 return NULL; | 58 return NULL; |
| 59 } | 59 } |
| 60 | 60 |
| 61 gfx::AcceleratedWidget | 61 gfx::AcceleratedWidget |
| 62 NativeViewAccessibilityWin::GetTargetForNativeAccessibilityEvent() { | 62 NativeViewAccessibilityWin::GetTargetForNativeAccessibilityEvent() { |
| 63 return HWNDForView(view_); | 63 return HWNDForView(view_); |
| 64 } | 64 } |
| 65 | 65 |
| 66 } // namespace views | 66 } // namespace views |
| OLD | NEW |