• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
3 // found in the LICENSE file.
4 
5 #ifndef CHROME_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MAC_H_
6 #define CHROME_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MAC_H_
7 #pragma once
8 
9 #include <map>
10 #include <utility>
11 #include <vector>
12 
13 #include "base/memory/scoped_nsobject.h"
14 #include "chrome/browser/accessibility/browser_accessibility.h"
15 
16 @class BrowserAccessibilityCocoa;
17 
18 class BrowserAccessibilityMac : public BrowserAccessibility {
19  public:
20   // Implementation of BrowserAccessibility.
21   virtual void Initialize();
22   virtual void NativeReleaseReference();
23 
24   // Overrides from BrowserAccessibility.
25   // Used to know when to update the cocoa children.
26   virtual void ReplaceChild(
27       BrowserAccessibility* old_acc,
28       BrowserAccessibility* new_acc);
29 
30   // The BrowserAccessibilityCocoa associated with us.
native_view()31   BrowserAccessibilityCocoa* native_view() const {
32     return browser_accessibility_cocoa_;
33   }
34 
35  private:
36   // This gives BrowserAccessibility::Create access to the class constructor.
37   friend class BrowserAccessibility;
38 
39   BrowserAccessibilityMac();
40 
41   // Allows access to the BrowserAccessibilityCocoa which wraps this.
42   // BrowserAccessibility.
43   // We own this object until our manager calls ReleaseReference;
44   // thereafter, the cocoa object owns us.
45   BrowserAccessibilityCocoa* browser_accessibility_cocoa_;
46   DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityMac);
47 };
48 
49 #endif // CHROME_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MAC_H_
50