[email protected] | b2ae783 | 2012-02-11 00:28:00 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | c5c2a67 | 2010-10-01 23:28:04 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
3 | // found in the LICENSE file. | ||||
4 | |||||
[email protected] | ba1fa65 | 2011-06-25 05:16:22 | [diff] [blame] | 5 | #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_WIN_H_ |
6 | #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_WIN_H_ | ||||
[email protected] | c5c2a67 | 2010-10-01 23:28:04 | [diff] [blame] | 7 | |
[email protected] | 20bb006 | 2010-10-06 21:24:37 | [diff] [blame] | 8 | #include <oleacc.h> |
9 | |||||
[email protected] | 8ee65ba | 2011-04-12 20:53:23 | [diff] [blame] | 10 | #include "base/win/scoped_comptr.h" |
[email protected] | ba1fa65 | 2011-06-25 05:16:22 | [diff] [blame] | 11 | #include "content/browser/accessibility/browser_accessibility_manager.h" |
[email protected] | c5c2a67 | 2010-10-01 23:28:04 | [diff] [blame] | 12 | |
[email protected] | e6b3487 | 2012-10-24 20:51:32 | [diff] [blame] | 13 | namespace content { |
[email protected] | c5c2a67 | 2010-10-01 23:28:04 | [diff] [blame] | 14 | class BrowserAccessibilityWin; |
[email protected] | c5c2a67 | 2010-10-01 23:28:04 | [diff] [blame] | 15 | |
[email protected] | c5c2a67 | 2010-10-01 23:28:04 | [diff] [blame] | 16 | // Manages a tree of BrowserAccessibilityWin objects. |
17 | class BrowserAccessibilityManagerWin : public BrowserAccessibilityManager { | ||||
18 | public: | ||||
[email protected] | c5c2a67 | 2010-10-01 23:28:04 | [diff] [blame] | 19 | virtual ~BrowserAccessibilityManagerWin(); |
20 | |||||
[email protected] | c5c2a67 | 2010-10-01 23:28:04 | [diff] [blame] | 21 | // Get a the default IAccessible for the parent window, does not make a |
22 | // new reference. | ||||
23 | IAccessible* GetParentWindowIAccessible(); | ||||
24 | |||||
[email protected] | f27e81c | 2010-10-07 05:20:23 | [diff] [blame] | 25 | // BrowserAccessibilityManager methods |
[email protected] | a527a02 | 2011-02-10 02:32:36 | [diff] [blame] | 26 | virtual void NotifyAccessibilityEvent(int type, BrowserAccessibility* node); |
[email protected] | c5c2a67 | 2010-10-01 23:28:04 | [diff] [blame] | 27 | |
[email protected] | b2ae783 | 2012-02-11 00:28:00 | [diff] [blame] | 28 | // Track this object and post a VISIBLE_DATA_CHANGED notification when |
29 | // its container scrolls. | ||||
30 | // TODO(dmazzoni): remove once http://crbug.com/113483 is fixed. | ||||
31 | void TrackScrollingObject(BrowserAccessibilityWin* node); | ||||
32 | |||||
[email protected] | c5c2a67 | 2010-10-01 23:28:04 | [diff] [blame] | 33 | private: |
[email protected] | f27e81c | 2010-10-07 05:20:23 | [diff] [blame] | 34 | BrowserAccessibilityManagerWin( |
35 | HWND parent_window, | ||||
[email protected] | e6b3487 | 2012-10-24 20:51:32 | [diff] [blame] | 36 | const AccessibilityNodeData& src, |
[email protected] | f27e81c | 2010-10-07 05:20:23 | [diff] [blame] | 37 | BrowserAccessibilityDelegate* delegate, |
38 | BrowserAccessibilityFactory* factory); | ||||
[email protected] | c5c2a67 | 2010-10-01 23:28:04 | [diff] [blame] | 39 | |
40 | // A default IAccessible instance for the parent window. | ||||
[email protected] | 8ee65ba | 2011-04-12 20:53:23 | [diff] [blame] | 41 | base::win::ScopedComPtr<IAccessible> window_iaccessible_; |
[email protected] | c5c2a67 | 2010-10-01 23:28:04 | [diff] [blame] | 42 | |
[email protected] | f27e81c | 2010-10-07 05:20:23 | [diff] [blame] | 43 | // Give BrowserAccessibilityManager::Create access to our constructor. |
44 | friend class BrowserAccessibilityManager; | ||||
[email protected] | c5c2a67 | 2010-10-01 23:28:04 | [diff] [blame] | 45 | |
[email protected] | b2ae783 | 2012-02-11 00:28:00 | [diff] [blame] | 46 | // Track the most recent object that has been asked to scroll and |
47 | // post a notification directly on it when it reaches its destination. | ||||
48 | // TODO(dmazzoni): remove once http://crbug.com/113483 is fixed. | ||||
49 | BrowserAccessibilityWin* tracked_scroll_object_; | ||||
50 | |||||
[email protected] | c5c2a67 | 2010-10-01 23:28:04 | [diff] [blame] | 51 | DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManagerWin); |
52 | }; | ||||
53 | |||||
[email protected] | e6b3487 | 2012-10-24 20:51:32 | [diff] [blame] | 54 | } // namespace content |
55 | |||||
[email protected] | ba1fa65 | 2011-06-25 05:16:22 | [diff] [blame] | 56 | #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_WIN_H_ |