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 "content/browser/accessibility/browser_accessibility_manager_win.h" | 5 #include "content/browser/accessibility/browser_accessibility_manager_win.h" |
6 | 6 |
7 #include <atlbase.h> | 7 #include <atlbase.h> |
8 #include <atlapp.h> | 8 #include <atlapp.h> |
9 #include <atlcom.h> | 9 #include <atlcom.h> |
10 #include <atlcrack.h> | 10 #include <atlcrack.h> |
(...skipping 13 matching lines...) Expand all Loading... |
24 // one main HWND for a frame, or even for the whole desktop. So, we need a | 24 // one main HWND for a frame, or even for the whole desktop. So, we need a |
25 // fake HWND as the root of the accessibility tree for each tab. | 25 // fake HWND as the root of the accessibility tree for each tab. |
26 // We should get rid of this code when the latest two versions of all | 26 // We should get rid of this code when the latest two versions of all |
27 // supported screen readers no longer make this assumption. | 27 // supported screen readers no longer make this assumption. |
28 // | 28 // |
29 // This class implements a child HWND with zero size, that delegates its | 29 // This class implements a child HWND with zero size, that delegates its |
30 // accessibility implementation to the root of the BrowserAccessibilityManager | 30 // accessibility implementation to the root of the BrowserAccessibilityManager |
31 // tree. This HWND is hooked up as the parent of the root object in the | 31 // tree. This HWND is hooked up as the parent of the root object in the |
32 // BrowserAccessibilityManager tree, so when any accessibility client | 32 // BrowserAccessibilityManager tree, so when any accessibility client |
33 // calls ::WindowFromAccessibleObject, they get this HWND instead of the | 33 // calls ::WindowFromAccessibleObject, they get this HWND instead of the |
34 // DesktopRootWindowHostWin. | 34 // DesktopWindowTreeHostWin. |
35 class AccessibleHWND | 35 class AccessibleHWND |
36 : public ATL::CWindowImpl<AccessibleHWND, | 36 : public ATL::CWindowImpl<AccessibleHWND, |
37 ATL::CWindow, | 37 ATL::CWindow, |
38 ATL::CWinTraits<WS_CHILD> > { | 38 ATL::CWinTraits<WS_CHILD> > { |
39 public: | 39 public: |
40 // Unfortunately, some screen readers look for this exact window class | 40 // Unfortunately, some screen readers look for this exact window class |
41 // to enable certain features. It'd be great to remove this. | 41 // to enable certain features. It'd be great to remove this. |
42 DECLARE_WND_CLASS_EX(L"Chrome_RenderWidgetHostHWND", CS_DBLCLKS, 0); | 42 DECLARE_WND_CLASS_EX(L"Chrome_RenderWidgetHostHWND", CS_DBLCLKS, 0); |
43 | 43 |
44 BEGIN_MSG_MAP_EX(AccessibleHWND) | 44 BEGIN_MSG_MAP_EX(AccessibleHWND) |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 // |parent_iaccessible_| are no longer valid either, since they were | 316 // |parent_iaccessible_| are no longer valid either, since they were |
317 // derived from AccessibleHWND. We don't have to restore them to | 317 // derived from AccessibleHWND. We don't have to restore them to |
318 // previous values, though, because this should only happen | 318 // previous values, though, because this should only happen |
319 // during the destruct sequence for this window. | 319 // during the destruct sequence for this window. |
320 accessible_hwnd_ = NULL; | 320 accessible_hwnd_ = NULL; |
321 parent_hwnd_ = NULL; | 321 parent_hwnd_ = NULL; |
322 parent_iaccessible_ = NULL; | 322 parent_iaccessible_ = NULL; |
323 } | 323 } |
324 | 324 |
325 } // namespace content | 325 } // namespace content |
OLD | NEW |