| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_ACCESSIBILITY_ACCESSIBILITY_EVENTS_H_ | 5 #ifndef CHROME_BROWSER_ACCESSIBILITY_ACCESSIBILITY_EVENTS_H_ |
| 6 #define CHROME_BROWSER_ACCESSIBILITY_ACCESSIBILITY_EVENTS_H_ | 6 #define CHROME_BROWSER_ACCESSIBILITY_ACCESSIBILITY_EVENTS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "ui/base/accessibility/accessibility_types.h" |
| 10 | 11 |
| 11 class AccessibilityEventInfo; | 12 class AccessibilityControlInfo; |
| 13 class AccessibilityMenuInfo; |
| 14 class AccessibilityWindowInfo; |
| 12 class Profile; | 15 class Profile; |
| 13 | 16 |
| 14 namespace base { | 17 namespace base { |
| 15 class DictionaryValue; | 18 class DictionaryValue; |
| 16 } | 19 } |
| 17 | 20 |
| 18 // Use the NotificationService to post the given accessibility | 21 // Notify the ExtensionAccessibilityEventRouter of the given accessibility |
| 19 // notification type with AccessibilityEventInfo details to any | 22 // event and AccessibilityEventInfo details. Will not send if the profile's |
| 20 // listeners. Will not send if the profile's pause level is nonzero | 23 // pause level is nonzero (using profile->PauseAccessibilityEvents). |
| 21 // (using profile->PauseAccessibilityEvents). | 24 void SendControlAccessibilityNotification( |
| 22 void SendAccessibilityNotification(int type, AccessibilityEventInfo* info); | 25 ui::AccessibilityTypes::Event event, |
| 26 AccessibilityControlInfo* info); |
| 27 |
| 28 void SendMenuAccessibilityNotification( |
| 29 ui::AccessibilityTypes::Event event, |
| 30 AccessibilityMenuInfo* info); |
| 31 |
| 32 void SendWindowAccessibilityNotification( |
| 33 ui::AccessibilityTypes::Event event, |
| 34 AccessibilityWindowInfo* info); |
| 23 | 35 |
| 24 // Abstract parent class for accessibility event information passed to event | 36 // Abstract parent class for accessibility event information passed to event |
| 25 // listeners. | 37 // listeners. |
| 26 class AccessibilityEventInfo { | 38 class AccessibilityEventInfo { |
| 27 public: | 39 public: |
| 28 virtual ~AccessibilityEventInfo() {} | 40 virtual ~AccessibilityEventInfo() {} |
| 29 | 41 |
| 30 // Serialize this class as a DictionaryValue that can be converted to | 42 // Serialize this class as a DictionaryValue that can be converted to |
| 31 // a JavaScript object. | 43 // a JavaScript object. |
| 32 virtual void SerializeToDict(base::DictionaryValue* dict) const = 0; | 44 virtual void SerializeToDict(base::DictionaryValue* dict) const = 0; |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 | 338 |
| 327 virtual void SerializeToDict(base::DictionaryValue* dict) const OVERRIDE; | 339 virtual void SerializeToDict(base::DictionaryValue* dict) const OVERRIDE; |
| 328 | 340 |
| 329 const std::string& value() const { return value_; } | 341 const std::string& value() const { return value_; } |
| 330 | 342 |
| 331 private: | 343 private: |
| 332 std::string value_; | 344 std::string value_; |
| 333 }; | 345 }; |
| 334 | 346 |
| 335 #endif // CHROME_BROWSER_ACCESSIBILITY_ACCESSIBILITY_EVENTS_H_ | 347 #endif // CHROME_BROWSER_ACCESSIBILITY_ACCESSIBILITY_EVENTS_H_ |
| OLD | NEW |