blob: d2860ad94c951885b46c666ba0c0a30a510d036b [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.
32 HWND parent_hwnd();
33
[email protected]c5c2a672010-10-01 23:28:0434 // Get a the default IAccessible for the parent window, does not make a
35 // new reference.
[email protected]a6120e32013-03-15 11:07:3536 IAccessible* parent_iaccessible();
[email protected]c5c2a672010-10-01 23:28:0437
[email protected]f27e81c2010-10-07 05:20:2338 // BrowserAccessibilityManager methods
[email protected]a527a022011-02-10 02:32:3639 virtual void NotifyAccessibilityEvent(int type, BrowserAccessibility* node);
[email protected]c5c2a672010-10-01 23:28:0440
[email protected]b2ae7832012-02-11 00:28:0041 // Track this object and post a VISIBLE_DATA_CHANGED notification when
42 // its container scrolls.
43 // TODO(dmazzoni): remove once http://crbug.com/113483 is fixed.
44 void TrackScrollingObject(BrowserAccessibilityWin* node);
45
[email protected]c5c2a672010-10-01 23:28:0446 private:
[email protected]a6120e32013-03-15 11:07:3547 // The closest ancestor HWND.
48 HWND parent_hwnd_;
[email protected]c5c2a672010-10-01 23:28:0449
[email protected]a6120e32013-03-15 11:07:3550 // The accessibility instance for the parent window.
51 IAccessible* parent_iaccessible_;
[email protected]c5c2a672010-10-01 23:28:0452
[email protected]f27e81c2010-10-07 05:20:2353 // Give BrowserAccessibilityManager::Create access to our constructor.
54 friend class BrowserAccessibilityManager;
[email protected]c5c2a672010-10-01 23:28:0455
[email protected]b2ae7832012-02-11 00:28:0056 // Track the most recent object that has been asked to scroll and
57 // post a notification directly on it when it reaches its destination.
58 // TODO(dmazzoni): remove once http://crbug.com/113483 is fixed.
59 BrowserAccessibilityWin* tracked_scroll_object_;
60
[email protected]c5c2a672010-10-01 23:28:0461 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManagerWin);
62};
63
[email protected]e6b34872012-10-24 20:51:3264} // namespace content
65
[email protected]ba1fa652011-06-25 05:16:2266#endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_WIN_H_