Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(540)

Side by Side Diff: content/browser/accessibility/browser_accessibility_mac.h

Issue 272573003: Add hack so VoiceOver speaks updates to injected live regions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clarified comment Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_MAC_H_ 5 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MAC_H_
6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MAC_H_ 6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MAC_H_
7 7
8 #include <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
11 11
12 #include "content/browser/accessibility/browser_accessibility.h" 12 #include "content/browser/accessibility/browser_accessibility.h"
13 13
14 @class BrowserAccessibilityCocoa; 14 @class BrowserAccessibilityCocoa;
15 15
16 namespace content { 16 namespace content {
17 17
18 class BrowserAccessibilityMac : public BrowserAccessibility { 18 class BrowserAccessibilityMac : public BrowserAccessibility {
19 public: 19 public:
20 // BrowserAccessibility overrides. 20 // BrowserAccessibility overrides.
21 virtual void NativeReleaseReference() OVERRIDE; 21 virtual void NativeReleaseReference() OVERRIDE;
22 virtual bool IsNative() const OVERRIDE; 22 virtual bool IsNative() const OVERRIDE;
23 virtual void OnDataChanged() OVERRIDE; 23 virtual void OnDataChanged() OVERRIDE;
24 24
25 // The BrowserAccessibilityCocoa associated with us. 25 // The BrowserAccessibilityCocoa associated with us.
26 BrowserAccessibilityCocoa* native_view() const { 26 BrowserAccessibilityCocoa* native_view() const {
27 return browser_accessibility_cocoa_; 27 return browser_accessibility_cocoa_;
28 } 28 }
29 29
30 // Detach the BrowserAccessibilityCocoa object and then recreate it.
31 // This is only used to work around VoiceOver bugs by forcing VoiceOver
32 // to rebuild its internal state.
33 void RecreateNativeObject();
David Tseng 2014/05/09 03:09:47 FYI; I forgot that the BAC creates its children (a
dmazzoni 2014/05/09 06:10:30 Oh! Good thought. Better idea, let's preserve the
34
30 private: 35 private:
31 // This gives BrowserAccessibility::Create access to the class constructor. 36 // This gives BrowserAccessibility::Create access to the class constructor.
32 friend class BrowserAccessibility; 37 friend class BrowserAccessibility;
33 38
34 BrowserAccessibilityMac(); 39 BrowserAccessibilityMac();
35 40
36 // Allows access to the BrowserAccessibilityCocoa which wraps this. 41 // Allows access to the BrowserAccessibilityCocoa which wraps this.
37 // BrowserAccessibility. 42 // BrowserAccessibility.
38 // We own this object until our manager calls ReleaseReference; 43 // We own this object until our manager calls ReleaseReference;
39 // thereafter, the cocoa object owns us. 44 // thereafter, the cocoa object owns us.
40 BrowserAccessibilityCocoa* browser_accessibility_cocoa_; 45 BrowserAccessibilityCocoa* browser_accessibility_cocoa_;
41 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityMac); 46 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityMac);
42 }; 47 };
43 48
44 } // namespace content 49 } // namespace content
45 50
46 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MAC_H_ 51 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698