| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "views/widget/native_widget_win.h" | 5 #include "views/widget/native_widget_win.h" |
| 6 | 6 |
| 7 #include <dwmapi.h> | 7 #include <dwmapi.h> |
| 8 | 8 |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/system_monitor/system_monitor.h" | 10 #include "base/system_monitor/system_monitor.h" |
| (...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1153 | 1153 |
| 1154 LRESULT NativeWidgetWin::OnGetObject(UINT uMsg, | 1154 LRESULT NativeWidgetWin::OnGetObject(UINT uMsg, |
| 1155 WPARAM w_param, | 1155 WPARAM w_param, |
| 1156 LPARAM l_param) { | 1156 LPARAM l_param) { |
| 1157 LRESULT reference_result = static_cast<LRESULT>(0L); | 1157 LRESULT reference_result = static_cast<LRESULT>(0L); |
| 1158 | 1158 |
| 1159 // Accessibility readers will send an OBJID_CLIENT message | 1159 // Accessibility readers will send an OBJID_CLIENT message |
| 1160 if (OBJID_CLIENT == l_param) { | 1160 if (OBJID_CLIENT == l_param) { |
| 1161 // Retrieve MSAA dispatch object for the root view. | 1161 // Retrieve MSAA dispatch object for the root view. |
| 1162 base::win::ScopedComPtr<IAccessible> root( | 1162 base::win::ScopedComPtr<IAccessible> root( |
| 1163 NativeViewAccessibilityWin::GetAccessibleForView( | 1163 GetWidget()->GetRootView()->GetNativeViewAccessible()); |
| 1164 GetWidget()->GetRootView())); | |
| 1165 | 1164 |
| 1166 // Create a reference that MSAA will marshall to the client. | 1165 // Create a reference that MSAA will marshall to the client. |
| 1167 reference_result = LresultFromObject(IID_IAccessible, w_param, | 1166 reference_result = LresultFromObject(IID_IAccessible, w_param, |
| 1168 static_cast<IAccessible*>(root.Detach())); | 1167 static_cast<IAccessible*>(root.Detach())); |
| 1169 } | 1168 } |
| 1170 | 1169 |
| 1171 if (kCustomObjectID == l_param) { | 1170 if (kCustomObjectID == l_param) { |
| 1172 // An MSAA client requestes our custom id. Assume that we have detected an | 1171 // An MSAA client requestes our custom id. Assume that we have detected an |
| 1173 // active windows screen reader. | 1172 // active windows screen reader. |
| 1174 OnScreenReaderDetected(); | 1173 OnScreenReaderDetected(); |
| (...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2064 | 2063 |
| 2065 // And now, notify them that they have a brand new parent. | 2064 // And now, notify them that they have a brand new parent. |
| 2066 for (NativeWidgets::iterator it = widgets.begin(); | 2065 for (NativeWidgets::iterator it = widgets.begin(); |
| 2067 it != widgets.end(); ++it) { | 2066 it != widgets.end(); ++it) { |
| 2068 (*it)->GetWidget()->NotifyNativeViewHierarchyChanged(true, | 2067 (*it)->GetWidget()->NotifyNativeViewHierarchyChanged(true, |
| 2069 new_parent); | 2068 new_parent); |
| 2070 } | 2069 } |
| 2071 } | 2070 } |
| 2072 | 2071 |
| 2073 } // namespace views | 2072 } // namespace views |
| OLD | NEW |