Chromium Code Reviews| 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(BrowserAccessibility* root) override; |
| 27 using BrowserAccessibilityManager::GetFocus; | |
|
dmazzoni
2016/02/18 21:16:42
Is this needed?
| |
| 27 | 28 |
| 28 // Implementation of BrowserAccessibilityManager. | 29 // Implementation of BrowserAccessibilityManager. |
| 29 void NotifyAccessibilityEvent(ui::AXEvent event_type, | 30 void NotifyAccessibilityEvent(ui::AXEvent event_type, |
| 30 BrowserAccessibility* node) override; | 31 BrowserAccessibility* node) override; |
| 31 | 32 |
| 32 NSView* parent_view() { return parent_view_; } | 33 NSView* parent_view() { return parent_view_; } |
| 33 | 34 |
| 34 private: | 35 private: |
| 35 void OnAtomicUpdateFinished( | 36 void OnAtomicUpdateFinished( |
| 36 ui::AXTree* tree, | 37 ui::AXTree* tree, |
| 37 bool root_changed, | 38 bool root_changed, |
| 38 const std::vector<ui::AXTreeDelegate::Change>& changes) override; | 39 const std::vector<ui::AXTreeDelegate::Change>& changes) override; |
| 39 | 40 |
| 40 // Returns an autoreleased object. | 41 // Returns an autoreleased object. |
| 41 NSDictionary* GetUserInfoForSelectedTextChangedNotification(); | 42 NSDictionary* GetUserInfoForSelectedTextChangedNotification(); |
| 42 | 43 |
| 43 // This gives BrowserAccessibilityManager::Create access to the class | 44 // This gives BrowserAccessibilityManager::Create access to the class |
| 44 // constructor. | 45 // constructor. |
| 45 friend class BrowserAccessibilityManager; | 46 friend class BrowserAccessibilityManager; |
| 46 | 47 |
| 47 NSView* parent_view_; | 48 NSView* parent_view_; |
| 48 | 49 |
| 49 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManagerMac); | 50 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManagerMac); |
| 50 }; | 51 }; |
| 51 | 52 |
| 52 } | 53 } |
| 53 | 54 |
| 54 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_MAC_H_ | 55 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_MAC_H_ |
| OLD | NEW |