| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 // |volume| must range between 0 to 100. | 278 // |volume| must range between 0 to 100. |
| 279 AccessibilityVolumeInfo(Profile* profile, double volume, bool is_muted); | 279 AccessibilityVolumeInfo(Profile* profile, double volume, bool is_muted); |
| 280 | 280 |
| 281 virtual void SerializeToDict(base::DictionaryValue* dict) const OVERRIDE; | 281 virtual void SerializeToDict(base::DictionaryValue* dict) const OVERRIDE; |
| 282 | 282 |
| 283 private: | 283 private: |
| 284 double volume_; | 284 double volume_; |
| 285 bool is_muted_; | 285 bool is_muted_; |
| 286 }; | 286 }; |
| 287 | 287 |
| 288 // Screen unlock event information; this class is used by onScreenUnlocked. |
| 289 class ScreenUnlockedEventInfo : public AccessibilityEventInfo { |
| 290 public: |
| 291 ScreenUnlockedEventInfo(Profile* profile); |
| 292 virtual void SerializeToDict(base::DictionaryValue* dict) const OVERRIDE; |
| 293 }; |
| 294 |
| 295 // Wake up event information; this class is used by onWokeUp. |
| 296 class WokeUpEventInfo : public AccessibilityEventInfo { |
| 297 public: |
| 298 WokeUpEventInfo(Profile* profile); |
| 299 virtual void SerializeToDict(base::DictionaryValue* dict) const OVERRIDE; |
| 300 }; |
| 301 |
| 288 // Accessibility information about a menu item; this class is used by | 302 // Accessibility information about a menu item; this class is used by |
| 289 // onControlFocused event listeners. | 303 // onControlFocused event listeners. |
| 290 class AccessibilityMenuItemInfo : public AccessibilityControlInfo { | 304 class AccessibilityMenuItemInfo : public AccessibilityControlInfo { |
| 291 public: | 305 public: |
| 292 AccessibilityMenuItemInfo(Profile* profile, | 306 AccessibilityMenuItemInfo(Profile* profile, |
| 293 const std::string& name, | 307 const std::string& name, |
| 294 bool has_submenu, | 308 bool has_submenu, |
| 295 int item_index, | 309 int item_index, |
| 296 int item_count); | 310 int item_count); |
| 297 | 311 |
| 298 virtual const char* type() const OVERRIDE; | 312 virtual const char* type() const OVERRIDE; |
| 299 | 313 |
| 300 virtual void SerializeToDict(base::DictionaryValue* dict) const OVERRIDE; | 314 virtual void SerializeToDict(base::DictionaryValue* dict) const OVERRIDE; |
| 301 | 315 |
| 302 int item_index() const { return item_index_; } | 316 int item_index() const { return item_index_; } |
| 303 int item_count() const { return item_count_; } | 317 int item_count() const { return item_count_; } |
| 304 bool has_submenu() const { return has_submenu_; } | 318 bool has_submenu() const { return has_submenu_; } |
| 305 | 319 |
| 306 private: | 320 private: |
| 307 bool has_submenu_; | 321 bool has_submenu_; |
| 308 // The 0-based index of the current item and the number of total items. | 322 // The 0-based index of the current item and the number of total items. |
| 309 int item_index_; | 323 int item_index_; |
| 310 int item_count_; | 324 int item_count_; |
| 311 }; | 325 }; |
| 312 | 326 |
| 313 #endif // CHROME_BROWSER_ACCESSIBILITY_EVENTS_H_ | 327 #endif // CHROME_BROWSER_ACCESSIBILITY_EVENTS_H_ |
| OLD | NEW |