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 AccessibilityEmptyEventInfo::AccessibilityEmptyEventInfo(Profile* profile) |
| 217 : AccessibilityEventInfo(profile) { |
| 218 } |
| 219 |
| 220 void AccessibilityEmptyEventInfo::SerializeToDict(DictionaryValue *dict) const { |
| 221 } |
| 222 |
216 AccessibilityMenuInfo::AccessibilityMenuInfo(Profile* profile, | 223 AccessibilityMenuInfo::AccessibilityMenuInfo(Profile* profile, |
217 const std::string& menu_name) | 224 const std::string& menu_name) |
218 : AccessibilityControlInfo(profile, menu_name) { | 225 : AccessibilityControlInfo(profile, menu_name) { |
219 } | 226 } |
220 | 227 |
221 const char* AccessibilityMenuInfo::type() const { | 228 const char* AccessibilityMenuInfo::type() const { |
222 return keys::kTypeMenu; | 229 return keys::kTypeMenu; |
223 } | 230 } |
224 | 231 |
225 AccessibilityMenuItemInfo::AccessibilityMenuItemInfo(Profile* profile, | 232 AccessibilityMenuItemInfo::AccessibilityMenuItemInfo(Profile* profile, |
(...skipping 10 matching lines...) Expand all Loading... |
236 const char* AccessibilityMenuItemInfo::type() const { | 243 const char* AccessibilityMenuItemInfo::type() const { |
237 return keys::kTypeMenuItem; | 244 return keys::kTypeMenuItem; |
238 } | 245 } |
239 | 246 |
240 void AccessibilityMenuItemInfo::SerializeToDict(DictionaryValue *dict) const { | 247 void AccessibilityMenuItemInfo::SerializeToDict(DictionaryValue *dict) const { |
241 AccessibilityControlInfo::SerializeToDict(dict); | 248 AccessibilityControlInfo::SerializeToDict(dict); |
242 dict->SetBoolean(keys::kHasSubmenuKey, has_submenu_); | 249 dict->SetBoolean(keys::kHasSubmenuKey, has_submenu_); |
243 dict->SetInteger(keys::kItemIndexKey, item_index_); | 250 dict->SetInteger(keys::kItemIndexKey, item_index_); |
244 dict->SetInteger(keys::kItemCountKey, item_count_); | 251 dict->SetInteger(keys::kItemCountKey, item_count_); |
245 } | 252 } |
OLD | NEW |