| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_fake_caret_win.h" | 5 #include "ui/accessibility/platform/ax_fake_caret_win.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "ui/accessibility/ax_enums.h" | 10 #include "ui/accessibility/ax_enums.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 if (event_target_) { | 46 if (event_target_) { |
| 47 ::NotifyWinEvent(EVENT_OBJECT_LOCATIONCHANGE, event_target_, OBJID_CARET, | 47 ::NotifyWinEvent(EVENT_OBJECT_LOCATIONCHANGE, event_target_, OBJID_CARET, |
| 48 -data_.id); | 48 -data_.id); |
| 49 } | 49 } |
| 50 } | 50 } |
| 51 | 51 |
| 52 const AXNodeData& AXFakeCaretWin::GetData() const { | 52 const AXNodeData& AXFakeCaretWin::GetData() const { |
| 53 return data_; | 53 return data_; |
| 54 } | 54 } |
| 55 | 55 |
| 56 const ui::AXTreeData& AXFakeCaretWin::GetTreeData() const { |
| 57 CR_DEFINE_STATIC_LOCAL(ui::AXTreeData, empty_data, ()); |
| 58 return empty_data; |
| 59 } |
| 60 |
| 56 gfx::NativeWindow AXFakeCaretWin::GetTopLevelWidget() { | 61 gfx::NativeWindow AXFakeCaretWin::GetTopLevelWidget() { |
| 57 return nullptr; | 62 return nullptr; |
| 58 } | 63 } |
| 59 | 64 |
| 60 gfx::NativeViewAccessible AXFakeCaretWin::GetParent() { | 65 gfx::NativeViewAccessible AXFakeCaretWin::GetParent() { |
| 61 if (!event_target_) | 66 if (!event_target_) |
| 62 return nullptr; | 67 return nullptr; |
| 63 | 68 |
| 64 gfx::NativeViewAccessible parent; | 69 gfx::NativeViewAccessible parent; |
| 65 HRESULT hr = | 70 HRESULT hr = |
| (...skipping 27 matching lines...) Expand all Loading... |
| 93 | 98 |
| 94 gfx::AcceleratedWidget AXFakeCaretWin::GetTargetForNativeAccessibilityEvent() { | 99 gfx::AcceleratedWidget AXFakeCaretWin::GetTargetForNativeAccessibilityEvent() { |
| 95 return event_target_; | 100 return event_target_; |
| 96 } | 101 } |
| 97 | 102 |
| 98 bool AXFakeCaretWin::AccessibilityPerformAction(const ui::AXActionData& data) { | 103 bool AXFakeCaretWin::AccessibilityPerformAction(const ui::AXActionData& data) { |
| 99 return false; | 104 return false; |
| 100 } | 105 } |
| 101 | 106 |
| 102 } // namespace ui | 107 } // namespace ui |
| OLD | NEW |