OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_ACCESSIBILITY_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_ACCESSIBILITY_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_ACCESSIBILITY_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_ACCESSIBILITY_API_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/callback.h" | 12 #include "base/callback.h" |
13 #include "base/singleton.h" | 13 #include "base/singleton.h" |
14 #include "base/values.h" | 14 #include "base/values.h" |
15 #include "chrome/browser/accessibility_events.h" | 15 #include "chrome/browser/accessibility_events.h" |
16 #include "chrome/browser/extensions/extension_function.h" | 16 #include "chrome/browser/extensions/extension_function.h" |
17 #include "chrome/common/notification_service.h" | 17 #include "chrome/common/notification_service.h" |
| 18 #include "chrome/common/notification_observer.h" |
18 #include "chrome/common/notification_registrar.h" | 19 #include "chrome/common/notification_registrar.h" |
19 | 20 |
20 // Observes the profile and routes accessibility notifications as events | 21 // Observes the profile and routes accessibility notifications as events |
21 // to the extension system. | 22 // to the extension system. |
22 class ExtensionAccessibilityEventRouter : public NotificationObserver { | 23 class ExtensionAccessibilityEventRouter : public NotificationObserver { |
23 public: | 24 public: |
24 // Single instance of the event router. | 25 // Single instance of the event router. |
25 static ExtensionAccessibilityEventRouter* GetInstance(); | 26 static ExtensionAccessibilityEventRouter* GetInstance(); |
26 | 27 |
27 // Safe to call multiple times. | 28 // Safe to call multiple times. |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 | 93 |
93 // API function that returns the most recent focused control. | 94 // API function that returns the most recent focused control. |
94 class GetFocusedControlFunction : public SyncExtensionFunction { | 95 class GetFocusedControlFunction : public SyncExtensionFunction { |
95 virtual ~GetFocusedControlFunction() {} | 96 virtual ~GetFocusedControlFunction() {} |
96 virtual bool RunImpl(); | 97 virtual bool RunImpl(); |
97 DECLARE_EXTENSION_FUNCTION_NAME( | 98 DECLARE_EXTENSION_FUNCTION_NAME( |
98 "experimental.accessibility.getFocusedControl") | 99 "experimental.accessibility.getFocusedControl") |
99 }; | 100 }; |
100 | 101 |
101 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_ACCESSIBILITY_API_H_ | 102 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_ACCESSIBILITY_API_H_ |
OLD | NEW |