blob: 2eefae974821bf23f1c1fd20fa6f7cea24dcf35f [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.
[email protected]a6120e32013-03-15 11:07:3517class CONTENT_EXPORT BrowserAccessibilityManagerWin
18 : public BrowserAccessibilityManager {
[email protected]c5c2a672010-10-01 23:28:0419 public:
[email protected]a6120e32013-03-15 11:07:3520 BrowserAccessibilityManagerWin(
21 HWND parent_hwnd,
22 IAccessible* parent_iaccessible,
23 const AccessibilityNodeData& src,
24 BrowserAccessibilityDelegate* delegate,
25 BrowserAccessibilityFactory* factory = new BrowserAccessibilityFactory());
26
[email protected]c5c2a672010-10-01 23:28:0427 virtual ~BrowserAccessibilityManagerWin();
28
[email protected]a6120e32013-03-15 11:07:3529 static AccessibilityNodeData GetEmptyDocument();
30
31 // Get the closest containing HWND.
[email protected]afe83752013-03-20 01:58:4132 HWND parent_hwnd() { return parent_hwnd_; }
[email protected]a6120e32013-03-15 11:07:3533
[email protected]afe83752013-03-20 01:58:4134 // The IAccessible for the parent window.
35 IAccessible* parent_iaccessible() { return parent_iaccessible_; }
36 void set_parent_iaccessible(IAccessible* parent_iaccessible) {
37 parent_iaccessible_ = parent_iaccessible;
38 }
[email protected]c5c2a672010-10-01 23:28:0439
[email protected]f27e81c2010-10-07 05:20:2340 // BrowserAccessibilityManager methods
[email protected]a527a022011-02-10 02:32:3641 virtual void NotifyAccessibilityEvent(int type, BrowserAccessibility* node);
[email protected]c5c2a672010-10-01 23:28:0442
[email protected]b2ae7832012-02-11 00:28:0043 // Track this object and post a VISIBLE_DATA_CHANGED notification when
44 // its container scrolls.
45 // TODO(dmazzoni): remove once http://crbug.com/113483 is fixed.
46 void TrackScrollingObject(BrowserAccessibilityWin* node);
47
[email protected]c5c2a672010-10-01 23:28:0448 private:
[email protected]a6120e32013-03-15 11:07:3549 // The closest ancestor HWND.
50 HWND parent_hwnd_;
[email protected]c5c2a672010-10-01 23:28:0451
[email protected]a6120e32013-03-15 11:07:3552 // The accessibility instance for the parent window.
53 IAccessible* parent_iaccessible_;
[email protected]c5c2a672010-10-01 23:28:0454
[email protected]f27e81c2010-10-07 05:20:2355 // Give BrowserAccessibilityManager::Create access to our constructor.
56 friend class BrowserAccessibilityManager;
[email protected]c5c2a672010-10-01 23:28:0457
[email protected]b2ae7832012-02-11 00:28:0058 // Track the most recent object that has been asked to scroll and
59 // post a notification directly on it when it reaches its destination.
60 // TODO(dmazzoni): remove once http://crbug.com/113483 is fixed.
61 BrowserAccessibilityWin* tracked_scroll_object_;
62
[email protected]c5c2a672010-10-01 23:28:0463 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManagerWin);
64};
65
[email protected]e6b34872012-10-24 20:51:3266} // namespace content
67
[email protected]ba1fa652011-06-25 05:16:2268#endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_WIN_H_