OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #ifndef CHROME_BROWSER_BROWSER_ACCESSIBILITY_H_ | 5 #ifndef CHROME_BROWSER_BROWSER_ACCESSIBILITY_H_ |
6 #define CHROME_BROWSER_BROWSER_ACCESSIBILITY_H_ | 6 #define CHROME_BROWSER_BROWSER_ACCESSIBILITY_H_ |
7 | 7 |
8 #include <atlbase.h> | 8 #include <atlbase.h> |
9 #include <atlcom.h> | 9 #include <atlcom.h> |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... |
25 //////////////////////////////////////////////////////////////////////////////// | 25 //////////////////////////////////////////////////////////////////////////////// |
26 class ATL_NO_VTABLE BrowserAccessibility | 26 class ATL_NO_VTABLE BrowserAccessibility |
27 : public CComObjectRootEx<CComMultiThreadModel>, | 27 : public CComObjectRootEx<CComMultiThreadModel>, |
28 public IDispatchImpl<IAccessible, &IID_IAccessible, &LIBID_Accessibility> { | 28 public IDispatchImpl<IAccessible, &IID_IAccessible, &LIBID_Accessibility> { |
29 public: | 29 public: |
30 BEGIN_COM_MAP(BrowserAccessibility) | 30 BEGIN_COM_MAP(BrowserAccessibility) |
31 COM_INTERFACE_ENTRY2(IDispatch, IAccessible) | 31 COM_INTERFACE_ENTRY2(IDispatch, IAccessible) |
32 COM_INTERFACE_ENTRY(IAccessible) | 32 COM_INTERFACE_ENTRY(IAccessible) |
33 END_COM_MAP() | 33 END_COM_MAP() |
34 | 34 |
35 BrowserAccessibility() {} | 35 BrowserAccessibility() |
| 36 : iaccessible_id_(-1), |
| 37 routing_id_(-1), |
| 38 process_id_(-1), |
| 39 parent_hwnd_(NULL), |
| 40 instance_active_(false) { |
| 41 } |
| 42 |
36 ~BrowserAccessibility() {} | 43 ~BrowserAccessibility() {} |
37 | 44 |
38 HRESULT Initialize(int iaccessible_id, | 45 HRESULT Initialize(int iaccessible_id, |
39 int routing_id, | 46 int routing_id, |
40 int process_id, | 47 int process_id, |
41 HWND parent_hwnd); | 48 HWND parent_hwnd); |
42 | 49 |
43 // Supported IAccessible methods. | 50 // Supported IAccessible methods. |
44 | 51 |
45 // Performs the default action on a given object. | 52 // Performs the default action on a given object. |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 // The instance should only be active if there is a non-terminated | 176 // The instance should only be active if there is a non-terminated |
170 // RenderProcessHost associated with it. The BrowserAccessibilityManager keeps | 177 // RenderProcessHost associated with it. The BrowserAccessibilityManager keeps |
171 // track of this state, and sets it to false to disable all calls into the | 178 // track of this state, and sets it to false to disable all calls into the |
172 // renderer from this instance of BroweserAccessibility, and have all | 179 // renderer from this instance of BroweserAccessibility, and have all |
173 // IAccessible functions return E_FAIL. | 180 // IAccessible functions return E_FAIL. |
174 bool instance_active_; | 181 bool instance_active_; |
175 | 182 |
176 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); | 183 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); |
177 }; | 184 }; |
178 #endif // CHROME_BROWSER_BROWSER_ACCESSIBILITY_H_ | 185 #endif // CHROME_BROWSER_BROWSER_ACCESSIBILITY_H_ |
OLD | NEW |