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 #include "chrome/browser/accessibility_events.h" | 5 #include "chrome/browser/accessibility_events.h" |
6 | 6 |
7 #include "base/values.h" | 7 #include "base/values.h" |
8 | 8 |
9 #include "chrome/browser/extensions/extension_accessibility_api_constants.h" | 9 #include "chrome/browser/extensions/extension_accessibility_api_constants.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 DCHECK(profile); | 206 DCHECK(profile); |
207 DCHECK_GE(volume, 0.0); | 207 DCHECK_GE(volume, 0.0); |
208 DCHECK_LE(volume, 100.0); | 208 DCHECK_LE(volume, 100.0); |
209 } | 209 } |
210 | 210 |
211 void AccessibilityVolumeInfo::SerializeToDict(DictionaryValue *dict) const { | 211 void AccessibilityVolumeInfo::SerializeToDict(DictionaryValue *dict) const { |
212 dict->SetDouble(keys::kVolumeKey, volume_); | 212 dict->SetDouble(keys::kVolumeKey, volume_); |
213 dict->SetBoolean(keys::kIsVolumeMutedKey, is_muted_); | 213 dict->SetBoolean(keys::kIsVolumeMutedKey, is_muted_); |
214 } | 214 } |
215 | 215 |
| 216 ScreenUnlockedEventInfo::ScreenUnlockedEventInfo(Profile* profile) |
| 217 : AccessibilityEventInfo(profile) { |
| 218 } |
| 219 |
| 220 void ScreenUnlockedEventInfo::SerializeToDict(DictionaryValue *dict) const { |
| 221 } |
| 222 |
| 223 WokeUpEventInfo::WokeUpEventInfo(Profile* profile) |
| 224 : AccessibilityEventInfo(profile) { |
| 225 } |
| 226 |
| 227 void WokeUpEventInfo::SerializeToDict(DictionaryValue *dict) const { |
| 228 } |
| 229 |
216 AccessibilityMenuInfo::AccessibilityMenuInfo(Profile* profile, | 230 AccessibilityMenuInfo::AccessibilityMenuInfo(Profile* profile, |
217 const std::string& menu_name) | 231 const std::string& menu_name) |
218 : AccessibilityControlInfo(profile, menu_name) { | 232 : AccessibilityControlInfo(profile, menu_name) { |
219 } | 233 } |
220 | 234 |
221 const char* AccessibilityMenuInfo::type() const { | 235 const char* AccessibilityMenuInfo::type() const { |
222 return keys::kTypeMenu; | 236 return keys::kTypeMenu; |
223 } | 237 } |
224 | 238 |
225 AccessibilityMenuItemInfo::AccessibilityMenuItemInfo(Profile* profile, | 239 AccessibilityMenuItemInfo::AccessibilityMenuItemInfo(Profile* profile, |
(...skipping 10 matching lines...) Expand all Loading... |
236 const char* AccessibilityMenuItemInfo::type() const { | 250 const char* AccessibilityMenuItemInfo::type() const { |
237 return keys::kTypeMenuItem; | 251 return keys::kTypeMenuItem; |
238 } | 252 } |
239 | 253 |
240 void AccessibilityMenuItemInfo::SerializeToDict(DictionaryValue *dict) const { | 254 void AccessibilityMenuItemInfo::SerializeToDict(DictionaryValue *dict) const { |
241 AccessibilityControlInfo::SerializeToDict(dict); | 255 AccessibilityControlInfo::SerializeToDict(dict); |
242 dict->SetBoolean(keys::kHasSubmenuKey, has_submenu_); | 256 dict->SetBoolean(keys::kHasSubmenuKey, has_submenu_); |
243 dict->SetInteger(keys::kItemIndexKey, item_index_); | 257 dict->SetInteger(keys::kItemIndexKey, item_index_); |
244 dict->SetInteger(keys::kItemCountKey, item_count_); | 258 dict->SetInteger(keys::kItemCountKey, item_count_); |
245 } | 259 } |
OLD | NEW |