| 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> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/memory/ptr_util.h" | 13 #include "base/memory/ptr_util.h" |
| 14 #include "base/memory/singleton.h" | 14 #include "base/memory/singleton.h" |
| 15 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
| 16 #include "base/win/scoped_comptr.h" | 16 #include "base/win/scoped_comptr.h" |
| 17 #include "base/win/windows_version.h" | 17 #include "base/win/windows_version.h" |
| 18 #include "third_party/iaccessible2/ia2_api_all.h" | 18 #include "third_party/iaccessible2/ia2_api_all.h" |
| 19 #include "ui/accessibility/ax_enums.h" | 19 #include "ui/accessibility/ax_enums.h" |
| 20 #include "ui/accessibility/ax_node_data.h" | 20 #include "ui/accessibility/ax_node_data.h" |
| 21 #include "ui/accessibility/ax_text_utils.h" | 21 #include "ui/accessibility/ax_text_utils.h" |
| 22 #include "ui/base/layout.h" |
| 22 #include "ui/base/win/accessibility_misc_utils.h" | 23 #include "ui/base/win/accessibility_misc_utils.h" |
| 23 #include "ui/base/win/atl_module.h" | 24 #include "ui/base/win/atl_module.h" |
| 24 #include "ui/views/controls/button/custom_button.h" | 25 #include "ui/views/controls/button/custom_button.h" |
| 25 #include "ui/views/focus/focus_manager.h" | 26 #include "ui/views/focus/focus_manager.h" |
| 26 #include "ui/views/focus/view_storage.h" | 27 #include "ui/views/focus/view_storage.h" |
| 27 #include "ui/views/widget/widget.h" | 28 #include "ui/views/widget/widget.h" |
| 28 #include "ui/views/win/hwnd_util.h" | 29 #include "ui/views/win/hwnd_util.h" |
| 29 | 30 |
| 30 namespace views { | 31 namespace views { |
| 31 | 32 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 56 return parent; | 57 return parent; |
| 57 | 58 |
| 58 return NULL; | 59 return NULL; |
| 59 } | 60 } |
| 60 | 61 |
| 61 gfx::AcceleratedWidget | 62 gfx::AcceleratedWidget |
| 62 NativeViewAccessibilityWin::GetTargetForNativeAccessibilityEvent() { | 63 NativeViewAccessibilityWin::GetTargetForNativeAccessibilityEvent() { |
| 63 return HWNDForView(view_); | 64 return HWNDForView(view_); |
| 64 } | 65 } |
| 65 | 66 |
| 67 gfx::RectF NativeViewAccessibilityWin::GetBoundsInScreen() const { |
| 68 gfx::RectF bounds = gfx::RectF(view_->GetBoundsInScreen()); |
| 69 gfx::NativeView native_view = view_->GetWidget()->GetNativeView(); |
| 70 float device_scale = ui::GetScaleFactorForNativeView(native_view); |
| 71 bounds.Scale(device_scale); |
| 72 return bounds; |
| 73 } |
| 74 |
| 66 } // namespace views | 75 } // namespace views |
| OLD | NEW |