blob: 9acaf716c59c855f43daad924961f80a10c882e5 [file] [log] [blame]
[email protected]b2ae7832012-02-11 00:28:001// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]c5c2a672010-10-01 23:28:042// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]ba1fa652011-06-25 05:16:225#ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_WIN_H_
6#define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_WIN_H_
[email protected]c5c2a672010-10-01 23:28:047
[email protected]20bb0062010-10-06 21:24:378#include <oleacc.h>
9
[email protected]8ee65ba2011-04-12 20:53:2310#include "base/win/scoped_comptr.h"
[email protected]ba1fa652011-06-25 05:16:2211#include "content/browser/accessibility/browser_accessibility_manager.h"
[email protected]c5c2a672010-10-01 23:28:0412
[email protected]e6b34872012-10-24 20:51:3213namespace content {
[email protected]c5c2a672010-10-01 23:28:0414class BrowserAccessibilityWin;
[email protected]c5c2a672010-10-01 23:28:0415
[email protected]c5c2a672010-10-01 23:28:0416// Manages a tree of BrowserAccessibilityWin objects.
17class BrowserAccessibilityManagerWin : public BrowserAccessibilityManager {
18 public:
[email protected]c5c2a672010-10-01 23:28:0419 virtual ~BrowserAccessibilityManagerWin();
20
[email protected]c5c2a672010-10-01 23:28:0421 // Get a the default IAccessible for the parent window, does not make a
22 // new reference.
23 IAccessible* GetParentWindowIAccessible();
24
[email protected]f27e81c2010-10-07 05:20:2325 // BrowserAccessibilityManager methods
[email protected]a527a022011-02-10 02:32:3626 virtual void NotifyAccessibilityEvent(int type, BrowserAccessibility* node);
[email protected]c5c2a672010-10-01 23:28:0427
[email protected]b2ae7832012-02-11 00:28:0028 // 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]c5c2a672010-10-01 23:28:0433 private:
[email protected]f27e81c2010-10-07 05:20:2334 BrowserAccessibilityManagerWin(
35 HWND parent_window,
[email protected]e6b34872012-10-24 20:51:3236 const AccessibilityNodeData& src,
[email protected]f27e81c2010-10-07 05:20:2337 BrowserAccessibilityDelegate* delegate,
38 BrowserAccessibilityFactory* factory);
[email protected]c5c2a672010-10-01 23:28:0439
40 // A default IAccessible instance for the parent window.
[email protected]8ee65ba2011-04-12 20:53:2341 base::win::ScopedComPtr<IAccessible> window_iaccessible_;
[email protected]c5c2a672010-10-01 23:28:0442
[email protected]f27e81c2010-10-07 05:20:2343 // Give BrowserAccessibilityManager::Create access to our constructor.
44 friend class BrowserAccessibilityManager;
[email protected]c5c2a672010-10-01 23:28:0445
[email protected]b2ae7832012-02-11 00:28:0046 // 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]c5c2a672010-10-01 23:28:0451 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManagerWin);
52};
53
[email protected]e6b34872012-10-24 20:51:3254} // namespace content
55
[email protected]ba1fa652011-06-25 05:16:2256#endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_WIN_H_