blob: 874dfaf13c324ae5c9295925f5349d9c226d5841 [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#pragma once
8
[email protected]20bb0062010-10-06 21:24:379#include <oleacc.h>
10
[email protected]8ee65ba2011-04-12 20:53:2311#include "base/win/scoped_comptr.h"
[email protected]ba1fa652011-06-25 05:16:2212#include "content/browser/accessibility/browser_accessibility_manager.h"
[email protected]c5c2a672010-10-01 23:28:0413#include "webkit/glue/webaccessibility.h"
14
15class BrowserAccessibilityWin;
[email protected]c5c2a672010-10-01 23:28:0416
[email protected]f27e81c2010-10-07 05:20:2317using webkit_glue::WebAccessibility;
[email protected]c5c2a672010-10-01 23:28:0418
19// Manages a tree of BrowserAccessibilityWin objects.
20class BrowserAccessibilityManagerWin : public BrowserAccessibilityManager {
21 public:
[email protected]c5c2a672010-10-01 23:28:0422 virtual ~BrowserAccessibilityManagerWin();
23
[email protected]c5c2a672010-10-01 23:28:0424 // Get a the default IAccessible for the parent window, does not make a
25 // new reference.
26 IAccessible* GetParentWindowIAccessible();
27
[email protected]f27e81c2010-10-07 05:20:2328 // BrowserAccessibilityManager methods
[email protected]a527a022011-02-10 02:32:3629 virtual void NotifyAccessibilityEvent(int type, BrowserAccessibility* node);
[email protected]c5c2a672010-10-01 23:28:0430
[email protected]b2ae7832012-02-11 00:28:0031 // Track this object and post a VISIBLE_DATA_CHANGED notification when
32 // its container scrolls.
33 // TODO(dmazzoni): remove once http://crbug.com/113483 is fixed.
34 void TrackScrollingObject(BrowserAccessibilityWin* node);
35
[email protected]c5c2a672010-10-01 23:28:0436 private:
[email protected]f27e81c2010-10-07 05:20:2337 BrowserAccessibilityManagerWin(
38 HWND parent_window,
39 const WebAccessibility& src,
40 BrowserAccessibilityDelegate* delegate,
41 BrowserAccessibilityFactory* factory);
[email protected]c5c2a672010-10-01 23:28:0442
43 // A default IAccessible instance for the parent window.
[email protected]8ee65ba2011-04-12 20:53:2344 base::win::ScopedComPtr<IAccessible> window_iaccessible_;
[email protected]c5c2a672010-10-01 23:28:0445
[email protected]f27e81c2010-10-07 05:20:2346 // Give BrowserAccessibilityManager::Create access to our constructor.
47 friend class BrowserAccessibilityManager;
[email protected]c5c2a672010-10-01 23:28:0448
[email protected]b2ae7832012-02-11 00:28:0049 // Track the most recent object that has been asked to scroll and
50 // post a notification directly on it when it reaches its destination.
51 // TODO(dmazzoni): remove once http://crbug.com/113483 is fixed.
52 BrowserAccessibilityWin* tracked_scroll_object_;
53
[email protected]c5c2a672010-10-01 23:28:0454 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManagerWin);
55};
56
[email protected]ba1fa652011-06-25 05:16:2257#endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_WIN_H_