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 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ | 5 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ |
6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ | 6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 class BrowserAccessibilityManager { | 46 class BrowserAccessibilityManager { |
47 public: | 47 public: |
48 // Creates the platform specific BrowserAccessibilityManager. Ownership passes | 48 // Creates the platform specific BrowserAccessibilityManager. Ownership passes |
49 // to the caller. | 49 // to the caller. |
50 static BrowserAccessibilityManager* Create( | 50 static BrowserAccessibilityManager* Create( |
51 gfx::NativeView parent_view, | 51 gfx::NativeView parent_view, |
52 const WebAccessibility& src, | 52 const WebAccessibility& src, |
53 BrowserAccessibilityDelegate* delegate, | 53 BrowserAccessibilityDelegate* delegate, |
54 BrowserAccessibilityFactory* factory = new BrowserAccessibilityFactory()); | 54 BrowserAccessibilityFactory* factory = new BrowserAccessibilityFactory()); |
55 | 55 |
| 56 // Creates the platform specific BrowserAccessibilityManager. Ownership passes |
| 57 // to the caller. |
| 58 static BrowserAccessibilityManager* CreateEmptyDocument( |
| 59 gfx::NativeView parent_view, |
| 60 WebAccessibility::State state, |
| 61 BrowserAccessibilityDelegate* delegate, |
| 62 BrowserAccessibilityFactory* factory = new BrowserAccessibilityFactory()); |
| 63 |
56 virtual ~BrowserAccessibilityManager(); | 64 virtual ~BrowserAccessibilityManager(); |
57 | 65 |
58 // Type is a ViewHostMsg_AccessibilityNotification_Params::int. | 66 // Type is a ViewHostMsg_AccessibilityNotification_Params::int. |
59 // We pass it as int so that we don't include the render message declaration | 67 // We pass it as int so that we don't include the render message declaration |
60 // header here. | 68 // header here. |
61 virtual void NotifyAccessibilityEvent( | 69 virtual void NotifyAccessibilityEvent( |
62 int type, | 70 int type, |
63 BrowserAccessibility* node) { } | 71 BrowserAccessibility* node) { } |
64 | 72 |
65 // Returns the next unique child id. | 73 // Returns the next unique child id. |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 // we use internally here. | 176 // we use internally here. |
169 base::hash_map<int32, int32> renderer_id_to_child_id_map_; | 177 base::hash_map<int32, int32> renderer_id_to_child_id_map_; |
170 | 178 |
171 // A mapping from child IDs to BrowserAccessibility objects. | 179 // A mapping from child IDs to BrowserAccessibility objects. |
172 base::hash_map<int32, BrowserAccessibility*> child_id_map_; | 180 base::hash_map<int32, BrowserAccessibility*> child_id_map_; |
173 | 181 |
174 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManager); | 182 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManager); |
175 }; | 183 }; |
176 | 184 |
177 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ | 185 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ |
OLD | NEW |