Chromium Code Reviews| 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_COCOA_H_ | 5 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_COCOA_H_ |
| 6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_COCOA_H_ | 6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_COCOA_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #import <Cocoa/Cocoa.h> | 9 #import <Cocoa/Cocoa.h> |
| 10 | 10 |
| 11 #import "base/memory/scoped_nsobject.h" | 11 #import "base/memory/scoped_nsobject.h" |
| 12 #import "content/browser/accessibility/browser_accessibility_delegate_mac.h" | 12 #import "content/browser/accessibility/browser_accessibility_delegate_mac.h" |
| 13 #include "content/browser/accessibility/browser_accessibility.h" | 13 #include "content/browser/accessibility/browser_accessibility.h" |
| 14 | 14 |
| 15 // BrowserAccessibilityCocoa is a cocoa wrapper around the BrowserAccessibility | 15 // BrowserAccessibilityCocoa is a cocoa wrapper around the BrowserAccessibility |
| 16 // object. The renderer converts webkit's accessibility tree into a | 16 // object. The renderer converts webkit's accessibility tree into a |
| 17 // WebAccessibility tree and passes it to the browser process over IPC. | 17 // WebAccessibility tree and passes it to the browser process over IPC. |
| 18 // This class converts it into a format Cocoa can query. | 18 // This class converts it into a format Cocoa can query. |
| 19 // Inheriting from NSView rather than NSObject as clients cannot add | 19 @interface BrowserAccessibilityCocoa : NSObject { |
|
dmazzoni
2011/08/02 06:19:35
Does this matter? Are we losing anything by inheri
David Tseng
2011/08/02 21:30:57
No; with the unique id private API's we no longer
| |
| 20 // observers to pure NSObject derived classes. | |
| 21 @interface BrowserAccessibilityCocoa : NSView { | |
| 22 @private | 20 @private |
| 23 BrowserAccessibility* browserAccessibility_; | 21 BrowserAccessibility* browserAccessibility_; |
| 24 scoped_nsobject<NSMutableArray> children_; | 22 scoped_nsobject<NSMutableArray> children_; |
| 25 id<BrowserAccessibilityDelegateCocoa> delegate_; | 23 id<BrowserAccessibilityDelegateCocoa> delegate_; |
| 26 } | 24 } |
| 27 | 25 |
| 28 // This creates a cocoa browser accessibility object around | 26 // This creates a cocoa browser accessibility object around |
| 29 // the cross platform BrowserAccessibility object. The delegate is | 27 // the cross platform BrowserAccessibility object. The delegate is |
| 30 // used to communicate with the host renderer. None of these | 28 // used to communicate with the host renderer. None of these |
| 31 // parameters can be null. | 29 // parameters can be null. |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 67 @property(nonatomic, readonly) NSArray* tabs; | 65 @property(nonatomic, readonly) NSArray* tabs; |
| 68 @property(nonatomic, readonly) NSString* title; | 66 @property(nonatomic, readonly) NSString* title; |
| 69 @property(nonatomic, readonly) NSString* url; | 67 @property(nonatomic, readonly) NSString* url; |
| 70 @property(nonatomic, readonly) NSString* value; | 68 @property(nonatomic, readonly) NSString* value; |
| 71 @property(nonatomic, readonly) NSValue* visibleCharacterRange; | 69 @property(nonatomic, readonly) NSValue* visibleCharacterRange; |
| 72 @property(nonatomic, readonly) NSNumber* visited; | 70 @property(nonatomic, readonly) NSNumber* visited; |
| 73 @property(nonatomic, readonly) id window; | 71 @property(nonatomic, readonly) id window; |
| 74 @end | 72 @end |
| 75 | 73 |
| 76 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_COCOA_H_ | 74 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_COCOA_H_ |
| OLD | NEW |