Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(348)

Side by Side Diff: chrome/browser/accessibility/browser_accessibility_manager.h

Issue 3591003: Make BrowserAccessibilityManager cross platform. Step 1.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Some cleanup. Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_
6 #define CHROME_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_
7 #pragma once
8
9 #include "build/build_config.h"
10
11 #if defined(OS_WIN)
12 #include <oleacc.h>
13 #endif
14
15 #include <vector>
16
17 #include "gfx/native_widget_types.h"
18 #include "webkit/glue/webaccessibility.h"
19
20 struct ViewHostMsg_AccessibilityNotification_Params;
21
22 using webkit_glue::WebAccessibility;
23
24 // Class that can perform actions on behalf of the BrowserAccessibilityManager.
25 class BrowserAccessibilityDelegate {
26 public:
27 virtual ~BrowserAccessibilityDelegate() {}
28 virtual void SetAccessibilityFocus(int acc_obj_id) = 0;
29 virtual void AccessibilityDoDefaultAction(int acc_obj_id) = 0;
30 };
31
32 // Manages a tree of BrowserAccessibility objects.
33 class BrowserAccessibilityManager {
34 public:
35 // Creates the platform specific BrowserAccessibilityManager. Ownership passes
36 // to the caller.
37 static BrowserAccessibilityManager* Create(
38 gfx::NativeWindow parent_window,
39 const webkit_glue::WebAccessibility& src,
40 BrowserAccessibilityDelegate* delegate);
41
42 virtual ~BrowserAccessibilityManager();
43
44 // Called when the renderer process has notified us of about tree changes.
45 // Send a notification to MSAA clients of the change.
46 void OnAccessibilityNotifications(
47 const std::vector<ViewHostMsg_AccessibilityNotification_Params>& params);
48
49 gfx::NativeWindow GetParentWindow();
50
51 #if defined(OS_WIN)
52 virtual IAccessible* GetRootAccessible() = 0;
53 #endif
54
55 protected:
56 explicit BrowserAccessibilityManager(gfx::NativeWindow parent_window);
57
58 virtual void OnAccessibilityObjectStateChange(
59 const webkit_glue::WebAccessibility& acc_obj) = 0;
60 virtual void OnAccessibilityObjectChildrenChange(
61 const webkit_glue::WebAccessibility& acc_obj) = 0;
62 virtual void OnAccessibilityObjectFocusChange(
63 const webkit_glue::WebAccessibility& acc_obj) = 0;
64 virtual void OnAccessibilityObjectLoadComplete(
65 const webkit_glue::WebAccessibility& acc_obj) = 0;
66 virtual void OnAccessibilityObjectValueChange(
67 const webkit_glue::WebAccessibility& acc_obj) = 0;
68
69 private:
70 // The parent window.
71 gfx::NativeWindow parent_window_;
72
73 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManager);
74 };
75
76 #endif // CHROME_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698