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_ACCESSIBILITY_EVENTS_H_ | 5 #ifndef CHROME_BROWSER_ACCESSIBILITY_EVENTS_H_ |
6 #define CHROME_BROWSER_ACCESSIBILITY_EVENTS_H_ | 6 #define CHROME_BROWSER_ACCESSIBILITY_EVENTS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 | 231 |
232 private: | 232 private: |
233 std::string value_; | 233 std::string value_; |
234 // The 0-based index of the current item and the number of total items. | 234 // The 0-based index of the current item and the number of total items. |
235 // If the value is not one of the drop-down options, |item_index_| should | 235 // If the value is not one of the drop-down options, |item_index_| should |
236 // be -1. | 236 // be -1. |
237 int item_index_; | 237 int item_index_; |
238 int item_count_; | 238 int item_count_; |
239 }; | 239 }; |
240 | 240 |
| 241 // Accessibility information about a menu; this class is used by |
| 242 // onMenuOpened, onMenuClosed, and onControlFocused event listeners. |
| 243 class AccessibilityMenuInfo : public AccessibilityControlInfo { |
| 244 public: |
| 245 AccessibilityMenuInfo(Profile* profile, std::string menu_name) |
| 246 : AccessibilityControlInfo(profile, menu_name) { } |
| 247 |
| 248 virtual void SerializeToDict(DictionaryValue *dict) const; |
| 249 }; |
| 250 |
| 251 // Accessibility information about a menu item; this class is used by |
| 252 // onControlFocused event listeners. |
| 253 class AccessibilityMenuItemInfo : public AccessibilityControlInfo { |
| 254 public: |
| 255 AccessibilityMenuItemInfo(Profile* profile, |
| 256 std::string name, |
| 257 bool has_submenu, |
| 258 int item_index, |
| 259 int item_count) |
| 260 : AccessibilityControlInfo(profile, name), |
| 261 has_submenu_(has_submenu), |
| 262 item_index_(item_index), |
| 263 item_count_(item_count) { |
| 264 } |
| 265 |
| 266 virtual void SerializeToDict(DictionaryValue *dict) const; |
| 267 |
| 268 private: |
| 269 bool has_submenu_; |
| 270 // The 0-based index of the current item and the number of total items. |
| 271 int item_index_; |
| 272 int item_count_; |
| 273 }; |
| 274 |
241 #endif // CHROME_BROWSER_ACCESSIBILITY_EVENTS_H_ | 275 #endif // CHROME_BROWSER_ACCESSIBILITY_EVENTS_H_ |
OLD | NEW |