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 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_MAC_H_ | 5 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_MAC_H_ |
6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_MAC_H_ | 6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_MAC_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "content/browser/accessibility/browser_accessibility_manager.h" | 11 #include "content/browser/accessibility/browser_accessibility_manager.h" |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 | 14 |
15 class CONTENT_EXPORT BrowserAccessibilityManagerMac | 15 class CONTENT_EXPORT BrowserAccessibilityManagerMac |
16 : public BrowserAccessibilityManager { | 16 : public BrowserAccessibilityManager { |
17 public: | 17 public: |
18 BrowserAccessibilityManagerMac( | 18 BrowserAccessibilityManagerMac( |
19 NSView* parent_view, | 19 NSView* parent_view, |
20 const ui::AXTreeUpdate& initial_tree, | 20 const ui::AXTreeUpdate& initial_tree, |
21 BrowserAccessibilityDelegate* delegate, | 21 BrowserAccessibilityDelegate* delegate, |
22 BrowserAccessibilityFactory* factory = new BrowserAccessibilityFactory()); | 22 BrowserAccessibilityFactory* factory = new BrowserAccessibilityFactory()); |
23 | 23 |
24 static ui::AXTreeUpdate GetEmptyDocument(); | 24 static ui::AXTreeUpdate GetEmptyDocument(); |
25 | 25 |
26 BrowserAccessibility* GetFocus(BrowserAccessibility* root) override; | 26 BrowserAccessibility* GetFocus() override; |
27 | 27 |
28 // Implementation of BrowserAccessibilityManager. | 28 // Implementation of BrowserAccessibilityManager. |
29 void NotifyAccessibilityEvent(ui::AXEvent event_type, | 29 void NotifyAccessibilityEvent(ui::AXEvent event_type, |
30 BrowserAccessibility* node) override; | 30 BrowserAccessibility* node) override; |
31 | 31 |
32 NSView* parent_view() { return parent_view_; } | 32 NSView* parent_view() { return parent_view_; } |
33 | 33 |
34 private: | 34 private: |
35 void OnAtomicUpdateFinished( | 35 void OnAtomicUpdateFinished( |
36 ui::AXTree* tree, | 36 ui::AXTree* tree, |
37 bool root_changed, | 37 bool root_changed, |
38 const std::vector<ui::AXTreeDelegate::Change>& changes) override; | 38 const std::vector<ui::AXTreeDelegate::Change>& changes) override; |
39 | 39 |
40 // Returns an autoreleased object. | 40 // Returns an autoreleased object. |
41 NSDictionary* GetUserInfoForSelectedTextChangedNotification(); | 41 NSDictionary* GetUserInfoForSelectedTextChangedNotification(); |
42 | 42 |
43 // This gives BrowserAccessibilityManager::Create access to the class | 43 // This gives BrowserAccessibilityManager::Create access to the class |
44 // constructor. | 44 // constructor. |
45 friend class BrowserAccessibilityManager; | 45 friend class BrowserAccessibilityManager; |
46 | 46 |
47 NSView* parent_view_; | 47 NSView* parent_view_; |
48 | 48 |
49 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManagerMac); | 49 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManagerMac); |
50 }; | 50 }; |
51 | 51 |
52 } | 52 } |
53 | 53 |
54 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_MAC_H_ | 54 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_MAC_H_ |
OLD | NEW |